Hello,
I have created a simple html page called welcome.html:
<FORM ACTION="welcome.php" METHOD=POST>
First Name: <INPUT TYPE=TEXT NAME="firstname"><BR>
Last Name: <INPUT TYPE=TEXT NAME="lastname">
<INPUT TYPE=SUBMIT VALUE="GO">
</FORM>
Then I created a php script called welcome.php and placed it in the same folder as the .html script:
<?php
echo( "Welcome to our Web site, $firstname $lastname!" );
?>
When I type the text and push the button, I see the php script has run, but the variables are empty. I tried it using scripts from another tutorial, and the same thing happens:
Welcome to our Web site, !
What am I doing wrong?
Thanks,
Chris
Passing variables?
Moderator: General Moderators
Re: Passing variables?
$_POST['firstname'] ...
There are 10 types of people in this world, those who understand binary and those who don't
Re: Passing variables?
Worked! Thanks!