You are here: Re: using url to send a variable - what's wrong? « All PHP « IT news, forums, messages
Re: using url to send a variable - what's wrong?

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)

 

Navigation:

[Reply to this message]


УдалСнная Ρ€Π°Π±ΠΎΡ‚Π° для программистов  •  Как Π·Π°Ρ€Π°Π±ΠΎΡ‚Π°Ρ‚ΡŒ Π½Π° Google AdSense  •  England, UK  •  ΡΡ‚Π°Ρ‚ΡŒΠΈ Π½Π° английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация