passing variables between different scripts

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Tomancer
Forum Newbie
Posts: 1
Joined: Wed Sep 01, 2004 3:02 pm

passing variables between different scripts

Post 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
Deemo
Forum Contributor
Posts: 418
Joined: Sun Jan 18, 2004 11:48 am
Location: Washington DC

Post by Deemo »

use $_GET['article']

take a look here
User avatar
tim
DevNet Resident
Posts: 1165
Joined: Thu Feb 12, 2004 7:19 pm
Location: ohio

Post 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
Post Reply