Re: Form problem variables are being sent in the query string
| From: | Chris | Date: | Mon, 22 Aug 2005 19:08:36 +0000 |
| Subject: | Re: Form problem variables are being sent in the query string | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-26281@lists.php.net to get a copy of this message | ||
Your form should be defined like this:
<form action="<?php echo htmlspecialchars($_SERVER['PHP_SELF']); ?>" method="post">
The post method is what keeps the variables off the URL string, the action is the page to submit the data to.
Chris
Jim MacDiarmid wrote:
I have 2 form fields one is a checkbox and the other is a hidden field. The checkbox is called "Display_" and gets incremented as the table rows are built like so. 'Display_'.$rec_count + 1 The hidden field is an array like this: Field[] The form method is $_SERVER['PHP_SELF'] For some reason, these form variables are being passed on the query line. Is there any way this can be prevented? Thanks in advance, Jim