Mantis_61 Posted July 26, 2006 Share Posted July 26, 2006 I've noticed when I send form requests to a file that stores the form input into variables I cannot use include this file with other files. Why is that? Can I not store the input into variables?[code]<?phpecho <<<end<form action=".../process.php" method="post"><select name="type"><option value="a">A</option><option value=a+">A pos</option></select></form>end;?>[/code]process...[code]<?php$type = "{$_POST['type']}";echo $type;?>[/code]however when I use an isset() it returns true?Is this due to the state or security? Quote Link to comment Share on other sites More sharing options...
Mantis_61 Posted July 26, 2006 Author Share Posted July 26, 2006 I'm sorry I didn't quite complete that. That does print there but when I include process.php in withother php files and attempt to echo the variable it does not display the input. Quote Link to comment Share on other sites More sharing options...
High_-_Tek Posted July 26, 2006 Share Posted July 26, 2006 First off, you dont need the "" or the {} around the $var assignment$type = $_POST['type'];And it will return true always because you will always have one value selected since you did not provide a null option in the form (even so you'd have to use empty() to test for a null value) Quote Link to comment Share on other sites More sharing options...
Mantis_61 Posted July 26, 2006 Author Share Posted July 26, 2006 I have the extra q marks and brackets prepending for a sql statement but it still isn't storing my values from the form? and I know I got typos up there it isn't the original script but the original gives no errors. I was just wanting to know if I do store these values from the post array into variables and include that file will it work? I'm trying to send data from a form to 2 different form processors. Is there another method to do this? Quote Link to comment Share on other sites More sharing options...
Mantis_61 Posted July 26, 2006 Author Share Posted July 26, 2006 well I found other methods just requires more typing. I'd still like to know why my post elements aren't storing. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.