Passing data to a php script

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
klure177
Forum Newbie
Posts: 2
Joined: Mon May 07, 2007 7:21 pm

Passing data to a php script

Post by klure177 »

I am trying to pass a text string to a php script like this

<img src="create_image.php?text=Testmessage">

but the string never gets passed to the script. The script "create_image.php" creates an image and I want to place some text on it. I copied the code out of Lerdorf's book "Programming PHP". Does it matter that I am using PHP5?
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

If the book says $text use $_GET['text'] instead and search for a more recent book/web tutorial.
see http://de2.php.net/manual/en/security.globals.php
klure177
Forum Newbie
Posts: 2
Joined: Mon May 07, 2007 7:21 pm

Post by klure177 »

That fixed it. Thanks.
Post Reply