php _get _set _go! (Question)

kobaj

VIP Member
I'm programming a website and decided to pass variables through _Get. I have it working correctly, for example...

Code:
echo "<a href='" . $_SERVER['PHP_SELF'] . "?word=bird'>http://notarealwebsite.com/index.php?word=bird</a>";
and I can snag it,
Code:
$var = $_Get['word'];
echo "the $var is the word"; //ignore concat

However, when I click the first link, the URL shows up as
Code:
http://notarealwebsite.com/index.php?

I know the variable is being passed, and index.php reflects this and echos it on screen. But is there a setting, or something I can do, so the url will stay?
Code:
http://notarealwebsite.com/index.php?word=bird

Some extra info, using the latest Firefox and PHP 5.
 
Figured it out!

Apache includes a module called mod_rewrite. Makes the url like this
Code:
http://notarealwebsite.com/index.php/bird/
Which works for me!
 
Back
Top