This list is only for people who develop PHP and not _with_ PHP.
Please contact a PHP users mailing list such as [EMAIL PROTECTED]

Good luck,

Andi

At 10:24 AM 1/25/2003 +0100, Frank Keessen wrote:
Hi all,

Please can you help me with the following:

If got a little sample code:

This one is working (!):

<?php
$vname=$_POST['vname'];
echo "hello $vname";
?>
<form action="<? echo ($_SERVER['PHP_SELF']); ?>" method=post>
<table>
<tr><td>Input yourname</td><td><input type=text name=vname></td></tr>
<tr><td colspan=2><input type=submit name=submit></td></tr>
</table>
</form>
<?php

?>

But when i'm using IF Else.. Nothing is happening. I'm only seeing the form but when i submit that form: The $vname doen't display..

Here is the code that doesn't work:

<?php
$vname=$_POST['vname'];
if($submit) {
echo "hello $vname";
} else {
?>
<form action="<? echo ($_SERVER['PHP_SELF']); ?>" method=post>
<table>
<tr><td>Input yourname</td><td><input type=text name=vname></td></tr>
<tr><td colspan=2><input type=submit name=submit></td></tr>
</table>
</form>
<?php
}
?>

What am I doing wrong???

Thanks,

Frank

--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to