Re: value error in PHP form
| From: | Kris Geens | Date: | Sun, 20 Jun 2004 12:29:45 +0000 |
| Subject: | Re: value error in PHP form | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-34845@lists.php.net to get a copy of this message | ||
Maybe this might work ....
----------
<html>
<head>
<title></title>
</head>
<body>
<?php
# check if the form has been submitted and action = login
if(isset($_POST['action'])&&$_POST['action']=="Login")
print $_POST['action'];
print $_POST['Name'];
# more statements ...
?>
<form name="frmname" action="<?php print $_SERVER['PHP_SELF'];
?>"
method="post">
<input type="text" name="Name" value="Rinku" />
<input type="submit" name="action" value="Login" />
</form>
</body>
</html>
----------
----- Original Message -----
From: "Rinku" <rinku_pgsql@yahoo.com>
To: "Marvin Hechanova" <mhechanova@gmail.com>; <php-db@lists.php.net>
Sent: Sunday, June 20, 2004 2:18 PM
Subject: Re: [PHP-DB] value error in PHP form
> Actually I want to use the function like
> if($action="Login")
> {
> Statements;
> }
> But here I am not getting any value in $action even I click on it.
> When I was using Linux at that time I had not this kind of problem.
>
> Rinku
> Marvin Hechanova <mhechanova@gmail.com> wrote:
> You have to assign values to your name and action
> e.g.
>
> [input] " value=Rinku>
> [input] " type=submit value="Submit Query"
> value="Login">
>
> but why would you want to print the results?
>
>
> On Sun, 20 Jun 2004 04:22:59 -0700 (PDT), Rinku wrote:
> >
> > Dear All,
> >
> > I have installed PHP on WinXp. I am using MySql as Backend on Apache
server.
> > Now the problem is......
> > I am writing this code :
> >
> >
> >
> >
> >
> >
> >
> >
> > [input]
> > [input]
> > > print $action;
> > print $Name;
> > ?>
> >
> >
> >
> > Here I should get output as LoginRinku
> > But I am getting nothing.
> >
> > Can any of you guide me on this........?
> >
> > Regards,
> > Rinku
> >
> >
> > ---------------------------------
> > Do you Yahoo!?
> > New and Improved Yahoo! Mail - Send 10MB messages!
>
>
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Mail - 50x more storage than other providers!