Im using the php book from this site, and im on the bit where we start doing php.... and this parts not working, the welcome.php?name=kevin stuff....
i dunno what im doing wrong, the php is working fine for the var stuff, so i figure it should be working for this? :\
source codes for the html and php files:
<A HREF="welcome.php?name=Kevin"> Hi, I'm Kevin! and i dont work! </A>
Basically when you are passing variables from urls, forms, sessions(you'll learn more about these later) etc you can't just access them in your page by calling the name of the variable. This is for security reasons.
If you have variables posted from a form using the post method, you'd access them by using
$name = $_POST['name'];
Where 'name' is the variable name from the form
Hopefully I explained it ok. If you're still confused just let us know.
Believe me it's much better to use the methods above. It may seem like more work now but like I mentioned it's for security reasons and in the long run you'll be glad you used them.
It looks like you are using the first copy of the book from Sitepoint. They have since released a newer revised edition which takes into consideration the fact that newer verisons of php now come with register globals off.
I don't know if it still applys but at one time owners of the old version could get a copy of the new book at no charge or something along those lines.
Might want to look into that or just remember how to access the variables when reading the rest of the book.