More stupid questions!

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
P.C. Vielle
Forum Newbie
Posts: 4
Joined: Mon May 04, 2009 3:42 pm
Location: E57

More stupid questions!

Post by P.C. Vielle »

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?
P.C. Vielle
Forum Newbie
Posts: 4
Joined: Mon May 04, 2009 3:42 pm
Location: E57

Re: More stupid questions!

Post by P.C. Vielle »

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!
ldougherty
Forum Contributor
Posts: 103
Joined: Sun May 03, 2009 11:39 am

Re: More stupid questions!

Post by ldougherty »

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
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: More stupid questions!

Post by Benjamin »

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.
Post Reply