Re: typing lynx in input box breaks script?
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.php archive

Re: typing lynx in input box breaks script?

From: Andre Frashek <andre.frashek@stud-mail.uni-wuerzburg.de>
Date: Wed Apr 19 2006 - 13:31:00 CEST

squash@peoriadesignweb.com wrote:
> <?php
>
> if ( isset ( $_REQUEST['message'] )) echo '<h3> Hello World </h3>';
>
> echo "<form action=test.php method=post>
> <input type=text name=message value='lynx abc'>
> <input type=submit value='Click here to see Hello World'>
> </form>
>
> <p> Type anything in place of 'lynx abc' and the script will work!";
>
> ?>
>

Hi, the script won´t work, because you forgot the curly braces in your
if instruction and IMHO some quotes. This works good for me:

<?php
if (isset($_REQUEST['message'])) {
        echo '<h3>Hello World</h3>';
}

echo ' <form action="test.php" method="post">
        <input type="text" name="message" value="lynx abc">
        <input type="submit" value="Click here to see Hello World">
        </form>
        <p>Type anything in place of "lynx abc" and the script will work!</p>
        ';
?>
Received on Mon May 1 02:59:24 2006