Reply to Re: PHP help with Control Structure

Your name:

Reply:


Posted by Geoff Berrow on 02/06/07 01:18

Message-ID: <45c7c91f$0$5753$4c368faf@roadrunner.com> from Bruce
Whealton contained the following:

> I'm learning PHP, using PHP 5.2.x and can't figure out
>what I am doing wrong with this simple control structure,
>an if-else block. It's an example from a text and it seems
>pretty simple but I get nothing on the page.

Get a new book. The following works


<body>
<?php if (isset($_GET['name']) ){ ?>
<p>Your name: <?php echo($_GET['name']); ?></p>
<p>This paragraph contains a
<a href="<?php echo $_SERVER['PHP_SELF']; ?>?name=<?php
echo(urlencode($_GET['name'])); ?>">
link</a> that passes the
name variable on to the next document.</p>
<?php
} else {
/* No name has been provided, so we
prompt the user for one. */
?>
<form action=<?php echo $_SERVER['PHP_SELF']; ?> METHOD="GET">
Please enter your name: <INPUT TYPE="TEXT" NAME="name">
<INPUT TYPE="SUBMIT" VALUE="GO" >
</form>
<?php } ?>
</body>

--
Geoff Berrow 0110001001101100010000000110
001101101011011001000110111101100111001011
100110001101101111001011100111010101101011

[Back to original 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

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация