Re: Small update problem
| From: | Mike Mike | Date: | Mon, 27 Nov 2000 20:24:01 +0000 |
| Subject: | Re: Small update problem | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-27447@lists.php.net to get a copy of this message | ||
Yup thats correct. I changed the input to
Password:<input type="Text" name="password">
and its still not updating the password field into the
database.
Have any more ideas?
--- Folke Ashberg <folke@fanstage.de> wrote:
>
> Hi!
> Yor write:
> Password:<input type="Text" name="$password">
> the name of that field is now the value of the
> variable $password, is that
> right?
> change to:
> Password:<input type="Text" name="password">
>
> regards
> Folke
>
> --
> Folke Ashberg
>
> Stage Internet Services GmbH
> Technical Development
> folke@fanstage.de
>
> folke@fanstage.de | Tel: +49 89 454591-77 | Fax: +49
> 89 454591-71
> Kreillerstr. 21 | 81673 Munich | Germany |
> www.fanstage.de
>
> On Mon, 27 Nov 2000, Mike Mike wrote:
>
> > Hello Everyone,
> > When I hit the submit button on a form the
> password
> > feild doesn't change in the database. I don't
> recieve
> > any error messages when I submit the form.
> > What am I doing wrong?
> > Heres the code.
> > <?
> > $user= "test"
> > if ($submit) {
> >
> > // process form
> >
> > $db = mysql_connect("localhost", "web", "web");
> >
> > mysql_select_db("UserName_Password",$db);
> >
> > $sql = "UPDATE user SET password='$password'
> WHERE
> > user='$user'";
> >
> > $result = mysql_query($sql);
> >
> > echo "Thank you! $user Your password is changed
> to
> > $password.\n";
> >
> > } else{
> >
> > ?>
> > <form method="post" action="<?php echo
> $PHP_SELF?>">
> >
> > Password:<input type="Text"
> name="$password"><br>
> >
> > <input type="Submit" name="submit" value="Enter
> > Password">
> >
> > </form>
> >
> > <?
> >
> > } // end if
> >
> > ?>
> >
> > =========================================
> > The fields in the database are as follows
> > +----------------------+
> > | ID | user | password |
> > +----------------------+
> > Thanks for your help.
> > --Mike
__________________________________________________
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
http://shopping.yahoo.com/