Hey, it's me again, the newbie, to ask more stupid questions that have simple answers! Okay, here goes:
1) When I use an HTML form and set ACTION to "myfile.php", do the contents of my form get processed by the PHP file as a part of the "php://stdin", or of the $argv array? Or am I completely wrong and there's some other place that they go?
2) Also, is there a PHP equivalent of JavaScripts eval() function? I know that PHP is more loose in its interpretation of strings, but can I create one with a function and then have it interpret it later?
More stupid questions!
Moderator: General Moderators
-
P.C. Vielle
- Forum Newbie
- Posts: 4
- Joined: Mon May 04, 2009 3:42 pm
- Location: E57
-
P.C. Vielle
- Forum Newbie
- Posts: 4
- Joined: Mon May 04, 2009 3:42 pm
- Location: E57
Re: More stupid questions!
Wait, could it be in the preset $_GET?
Somebody tell me or give me an example of some way that I can use the right method of retreiving form inputs!
Somebody tell me or give me an example of some way that I can use the right method of retreiving form inputs!
-
ldougherty
- Forum Contributor
- Posts: 103
- Joined: Sun May 03, 2009 11:39 am
Re: More stupid questions!
When submitting a form you have to state on the form how the variables should be referenced.
For example if you say form method=POST then you can variables will not be shown in the URL and you should use $var = $_POST[varname]; or if you use form method=GET then the variables will be shown in the URL and you should use $var = $_GET[varname];
You should read up on predefined variables from http://us.php.net/variables.predefined as this will likely explain things clearly to you.
As for your question regarding strings, what exactly is it that you are trying to do? Have you looked at the PHP manual for string manipulation?
http://us.php.net/strings
For example if you say form method=POST then you can variables will not be shown in the URL and you should use $var = $_POST[varname]; or if you use form method=GET then the variables will be shown in the URL and you should use $var = $_GET[varname];
You should read up on predefined variables from http://us.php.net/variables.predefined as this will likely explain things clearly to you.
As for your question regarding strings, what exactly is it that you are trying to do? Have you looked at the PHP manual for string manipulation?
http://us.php.net/strings
Re: More stupid questions!
Forum Rules 1 1.1 2 wrote: Use descriptive subjects when you start a new thread. Vague titles such as "Help!", "Why?" are misleading and keep you from receiving an answer to your question.