You are here: Re: Newbie 2 « PHP Programming Language « IT news, forums, messages
Re: Newbie 2

Posted by chaghri on 06/29/07 22:06

I think after the line below,
> if ($_POST['submit'] == "Register")
you should get the inputs into $username and $password variables from
post array as follows:
$username = $_POST['whatevertheinputfieldname'];
$password = $_POST['whatevertheinputfieldname'];

On Jun 30, 12:52 am, Reggie <joelregisfo...@hotmail.com> wrote:
> Notice: Undefined variable: username in /home/fhlinux169/c/
> clashoff.co.uk/user/htdocs/create_entry.php on line 11
>
> Notice: Undefined variable: password in /home/fhlinux169/c/
> clashoff.co.uk/user/htdocs/create_entry.php on line 11
>
> Ive got a new error message please help.Am trying to setup userlogin
> on my website.
>
> This is the code:
>
> <?php
>
> mysql_connect("localhost","root") or
> die ("Could not connect to database");
> mysql_select_db("user") or
> dir ("Could not select database");
>
> if ($_POST['submit'] == "Register")
> {
> $query = "insert into users
> (username, password) values ('$username', '$password')";
> mysql_query($query) or
> die (mysql_error());
> ?>
> <h3>You are now registered</h3>
> <a href="index.html">Go back to main page</a>
> <?php}
>
> else
> {
> print("not registered");}
>
> ?>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация