[UPHPU] Newbie needs help

Tyler Gee geekout at gmail.com
Fri Jun 10 11:18:14 MDT 2005


My guess is the problem is in this:

<a href="newpage.php?name=<?=urlencode($name)?>"

But I will have to think about it a little more.

-wtgee

On 6/10/05, John M <johnm_ul at yahoo.com> wrote:
> Everyone:  Thanks for the input so far.  I've inserted
> $_REQUEST['name'] and I've used $_SERVER["PHP_SELF"].
> At this point I'm not getting a blank page anymore.
> Right now I'm getting...(after leaving the text box
> blank on the html page)
> 
> 
> Your name:
> 
> This paragraph contains a link that passes the name
> variable on to the next document
> 
> 
> I get that response no matter what I put into the text
> box on the html page.  I guess my if/else statement
> isn't working right?  I'm trying to get a response
> that asks me for my name again.  I know this is only
> supposed to happen when I leave the html text box
> blank which is what I've been doing to test this
> little exercise in the book I'm reading.
> 
> Here is what I have in my php file now (anyone see any
> syntax problems there?)....
> 
> <?php
> $name = $_REQUEST['name'];
> if (!isset($name))  {
> ?>
> <!-- No name has been provided, so we
>  prompt the user for one.       -->
> 
> <form action="<?=$_SERVER["PHP_SELF"]?>"
> method="post">
> Please enter your name: <input type="text" name="name"
> />
> <input type="submit" value="GO" />
> </form>
> 
> <?php } else  { ?>
> <p>Your name: <?=$name?></p>
> 
> <p>This paragraph contains a <a
> href="newpage.php?name=<?=urlencode($name)?>">link</a>
> that passes the name variable on to the next
> document</p>
> 
> <?php } ?>
> 
> 
> 
> __________________________________
> Discover Yahoo!
> Get on-the-go sports scores, stock quotes, news and more. Check it out!
> http://discover.yahoo.com/mobile.html
> 
> _______________________________________________
> 
> UPHPU mailing list
> UPHPU at uphpu.org
> http://uphpu.org/mailman/listinfo/uphpu
> IRC: #uphpu on irc.freenode.net
>




More information about the UPHPU mailing list