Posted by Lόpher Cypher on 01/03/06 15:57
Leszek wrote:
> Hi.
>
> I want to send a variable to my script using url.
> I don't know why but echo in "szczegoly.php" display nothing...
>
> // strona1.php
> <A HREF=\"./szczegoly.php?nazwah=$nazwa_hotelu\">$nazwa_hotelu</A>
>
> //szczegoly.php
> <?php
> echo "<p>{$_GET['nazwah']}</p>";
> ?>
>
> What's wrong?
>
1) See if your script actually gets to the echo statement :) Just insert
some output right before it (say, echo "debug";). I often don't get php
errors printed out so, knowing what I've changed, I insert echo
"whatever" along the code to find in which block the error occurs :)
2) Try to output $_GET - echo "<pre>"; print_r($_GET); echo "</pre>";
and see if $GET["nazwah"] is set :)
--
- lΓΌpher
---------------------------------------------
"Man sieht nur das, was man weiΓ" (Goethe)
[Back to original message]
|