Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can not get GET/Post Variables as $FormFieldName

Status
Not open for further replies.

Lutfal

Programmer
Nov 4, 2001
14
IN
Hi,

I have installed Redhat Linux 9. With the same Installation PHP/MySQL/Apache has been installed.
However the automatic posting of form fields is not working.

Following is the example :

<form action=ActionPage.php method=Post>
<input type=text name=&quot;FirstName&quot; value=&quot;Lutfal&quot;>
</form>

At ActionPage.php
$FirstName return NULL value.
But $_POST['FirstName'] returns expected Value (here &quot;Lutfal&quot;)

Is there anything to configure at PHP.INI file ? Or any other solution ?

Thanks in advance.

Lutfal
 
Yes,

The 'register globals' in php.ini decides if u can directly get the value as a formfieldname or not.

In PHP versions >= 4.1 the Register Globals are set to off by default for security reasons.

I strongly suggest to keep it OFF and retrieve the variable using Global Arrays like $_GET[] or $_POST[]..

for more info have a look at ..

--------------------------------------------------------------------------
I never set a goal because u never know whats going to happen tommorow.
 
Thanks for the solutions. I already made the changes and get things working.

I need it to make my Old developments where we did not use $_POST or $_GET. For new codes in fact that is not required.

Thanks again.

Lutfal
 
Thanks for the solutions. I already made the changes and got things working.

I need it to make my Old developments where we did not use $_POST or $_GET. For new codes in fact that is not required.

Thanks again.

Lutfal
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top