Am Freitag, 20. Juni 2003 08:06 schrieb Robby Ku:
> Hi,
>
> I've got a problem passing a query string from a HTML file to a PHP file. I
> created a HTML file called "welcome.html" with the following link:
>
> <a href="welcome.php?name=Andy"> Hi, I'm Andy </a>
>
> I am trying to pass the query string Andy to a PHP file called
> "welcome.php" with the following command:
>
> <?php echo ("Welcome, $name!"); ?>
Change this line to:
<?php
echo"Welcome, " . $_GET['name'];
?>
and that's it.
If this doesn't work, because your PHP-Version is <=4.0.6 than try this, if
you can't update:
<?php
echo"Welcome, " . $HTTP_GET_VARS['name'];
?>
For security-reasons leave your php.ini with:
register_globals=off
>
> After i load "welcome.html" in my browser, i try linking it to
> "welcome.php" through the hyperlink i created. But the result i got was
>
> "Welcome, !"
"Welcome, Andy!" ;-)
CU
Thorsten
--
Thorsten K�rner http://www.123tkShop.org
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php