RE: [PHP] Variables not working!
| From: | Larry Brown | Date: | Tue, 20 Jan 2004 12:21:04 +0000 |
| Subject: | RE: [PHP] Variables not working! | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-175125@lists.php.net to get a copy of this message | ||
It is most likely globals. Access the variables by...
echo $_GET['fname'];
or $_POST['fname']; if you are using post which it doesn't appear you do.
Larry
PS it is adviseable to leave globals alone in php.ini since it is set that
way for security concerns.
-----Original Message-----
From: Kaushan [mailto:ckaushalya@yahoo.com]
Sent: Monday, January 19, 2004 10:44 AM
To: php-general@lists.php.net
Subject: [PHP] Variables not working!
Hi,
I am new to PHP scripting and struggling with the following problem.
I have two files, an HTML file and a PHP file.
HTML file contains a form with one text field and a submit button.
When a user pressed the submit button, it calls the php file (<form
action="test.php" ...>).
What the php file does is just echo back the text received from html file
to the user again.
Name of the text field is 'fname'. When I used this variable in the php file
(as $fname) it does not contain the value of the text field. Query-string
appended to the url during the submission is also correct.
I checked for all syntax errors, but the codings are perfect.
Do I have to change php.ini file to fix this problem.
Could anyone can help me to solve this problem.
Kaushan
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php