Re: Automatic Form processor

From: Date: Wed, 20 Oct 2004 13:50:07 +0000
Subject: Re: Automatic Form processor
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-199883@lists.php.net to get a copy of this message
> As Dan has already said, something like this is what you need: > > > foreach ( $_POST as $key => $value ) > > { > > if ( substr( $key, 0, 4 ) == "quest" ) > > echo "$value: $key\n"; > > } > > HOWEVER, this leaves your script wide open to security issues, because > you're placing all the power in the HTML form, rather than on the > sever-side PHP script. Well, you're right. I was vague on my solution. The proper way would be to validate all your form data to combat XSS, SQL Injections, JavaScript attacks, etc. There could be a lot of reprocussions to not doing so. After that, then build your e-mail our web page output. -Dan Joseph

« previous php.general (#199883) next »