Page 1 of 1

$_POST And $_REQUEST variables Ignored by echo function

PostPosted: 22. August 2015 12:19
by mirundiuk
I have declared variables using $_POST and $_REQUEST to hold data entered in fields on forms eg
$name=$_REQUEST['lastname']; to hold the name entered in a text box on the form with name="lastname".
The opening tag of this form includes action="insertProcess.php".
insertProcess.php is the external file to handle the insert.php file.
The code in this external insertProcess.php file includes
$lastname=$_REQUEST['last'];
$firstname=$_REQUEST['first'];
echo($firstname .' ' .$lastname);
When I run the form file, insert.php, fill in the first name and last name details in the relevant text boxes and click
the submit button, I expect to see the first name and last name entered on the form to appear on the screen but they don't.
I need help with solving this problem. My php editor is Aptana Studio 3.

Any help out there ?

Rgards Moses Mirundi

Re: $_POST And $_REQUEST variables Ignored by echo function

PostPosted: 22. August 2015 12:42
by Altrea
mirundiuk wrote:echo(firstname .' ' .lastname);

You missed the $ in front of your variable names