PDA

View Full Version : GLOBAL VARS How do I get PHP form process scrip to recognize the variables.



conzago
January 8th, 2009, 12:44 PM
GlOBAL VARS OFF

I haven't done much PHP, but on the site that we are working on we have to create email forms with PHP but as a security parameter we have to keep global vars off, so how do we write a secure script the receives the variables without $_POST or $_GET.

Thanks.

Wilhelm Murdoch
January 8th, 2009, 06:32 PM
Hi! So, you're saying even with register_globals off, $_POST or $_GET arrays return nothing? If this is the case, you might want to try importing them back into your script. Look into the 'import_request_variables' function.

That should point you in the right direction. :)

conzago
January 9th, 2009, 11:11 AM
I realized that with global Vars off, we can still pull variables from $_POST

like this...

if(isset($_POST['send'])) {
$reciever=$_POST['reciever'];
$subject=$_POST['subject'];
$from=$_POST['name'];
$email=$_POST['sender'];
$phone=$_POST['phone'];
$type=$_POST['who'];
$company=$_POST['company'];
$state=$_POST['state'];
$question=$_POST['message'];
$subscription=$_POST['subscribe'];
}

This is working with our HTMl scripts but virtually the same form in flash , is not working with nearly identical code, is there something I a missing?