Re: Parse out text
| From: | Tom Rogers | Date: | Sat, 14 Dec 2002 01:27:49 +0000 |
| Subject: | Re: Parse out text | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-128229@lists.php.net to get a copy of this message | ||
Hi,
Saturday, December 14, 2002, 10:12:28 AM, you wrote:
SM> I have a form that is submitting a Javascript to validate fields before the
SM> form casn be submitted. The problem is that the field name has to be
SM> prefixed with "required". So, if I have a field called email, it has to be
SM> called requiredemail in order for the javascript to work.
SM> How can I remove the "required" before the form is submitted? All I need is
SM> a hint...
SM> Thanks,
SM> Shane
In php on the recieving end like this:
$input_vars = array();
while(list($key,$var) = each($_POST)){
if(substr($key,0,7) == 'required'){
$key = substr($key,8);
}
$input_vars[$key] = $val;
}
Then use the values from $input_vars
--
regards,
Tom