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
trtdInput yourname/tdtdinput type=text name=vname/td/tr
trtd colspan=2input
On Saturday 25 January 2003 18:27, Frank Keessen wrote:
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) {
Try some basic
, January 25, 2003 11:36 AM
Subject: Re: [PHP] If... Else.. I'm not getting it!
On Saturday 25 January 2003 18:27, Frank Keessen wrote:
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
Hi,
On Saturday 25 January 2003 12:18, Frank Keessen wrote:
The register_globals = Off. Dit the basic echo ($submit) but it displays
nothing..
Any thoughts somebody??
Switch on register_globals or (better!) use $_GET['submit'], $_POST['submit']
or $_REQUEST['submit'].
Thanks for helping
: Johannes Schlueter [EMAIL PROTECTED]
To: Frank Keessen [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Saturday, January 25, 2003 12:25 PM
Subject: Re: [PHP] If... Else.. I'm not getting it!
Hi,
On Saturday 25 January 2003 12:18, Frank Keessen wrote:
The register_globals = Off. Dit the basic echo
/tdtdinput type=text name=vname/td/tr
trtd colspan=2input type=submit name=submit/td/tr
/table
/form
?php
}
?
Rich
-Original Message-
From: Frank Keessen [mailto:[EMAIL PROTECTED]]
Sent: 25 January 2003 11:33
To: Johannes Schlueter; [EMAIL PROTECTED]
Subject: Re: [PHP] If... Else.. I'm not getting
: RE: [PHP] If... Else.. I'm not getting it!
You are using the post method not get so $_GET[] should be empty.
Does this version of your code work?
?php
if(isset($_POST['submit'])) {
$vname=$_POST['vname'];
echo hello $vname;
} else {
?
form action=? echo ($_SERVER['PHP_SELF
On Saturday 25 January 2003 19:18, Frank Keessen wrote:
Hi,
The register_globals = Off. Dit the basic echo ($submit) but it displays
nothing..
Any thoughts somebody??
If register_globals is not enabled then you need to use $_POST['submit']
(just
as you had to use $_POST['vname']).
8 matches
Mail list logo