Dears ,
I am a beginner in PHP , i like it so much ,i try everyday to know a new thing about it .
I have a question and I hope to find an answer .
lets first have a look on the below simple code .
first page : first.php
<form method="post" action="second.php">
<input type="text" name="fname">
<input type="text" name="lname">
<input type="submit" value="Go">
</form>
second page : second.php -----> version 1
<?php
$firstname=$_post["fname"];
$lastname=$_post["lname"];
echo $fistname.$lastname;
?>
second page : second.php -----> version 2
<?php
echo $fname.$lname;
?>
Now , my question is :
What is the difference between version 1 of second page and vesion 2 of second page ??
i try both of them and both of them are work with no problem .
so do they have the same meaning ?
in other words Does $_post mandatory ? or i can ignore it .
Thanks .