Page 1 of 1

passing variables between different scripts

Posted: Wed Sep 01, 2004 3:54 pm
by Tomancer
Hi,

I'm doing my first steps with php so I need some help finding my mistake.
I wrote a html-file with the following line to pass the value to an php-script

file.html
....
<a href="answer.php?article=table">table</a>

my php script looks like:

<?
echo $article;
?>

I get an the erromessage: Undefined variable articel in answer.php
Some ideas?

Thanks Tom

Posted: Wed Sep 01, 2004 3:56 pm
by Deemo
use $_GET['article']

take a look here

Posted: Wed Sep 01, 2004 4:03 pm
by tim
or turn your register globals on, which isnt a good idea.

the above post is best advice.

for more info on register globals (can never know to much)

http://us4.php.net/manual/en/security.globals.php