Re: Again, and Again, and AGAIN!

From: Date: Sun, 17 Mar 2002 04:12:24 +0000
Subject: Re: Again, and Again, and AGAIN!
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-88800@lists.php.net to get a copy of this message
I'm using PHP 4.1.1 (for Windows). Here is *all* of my code. <html> <head> <title>Administrative Log-In Page</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body bgcolor="#FFFFFF"> Please enter your username and password below in the fields below. <form method="post" action="<?php echo $PHP_SELF; ?>"> Username: <input type="text" name="username" maxlength="255" value="<?php echo $HTTP_POST_VARS['username']; ?>"> <br> Password: <input type="text" name="password" maxlength="8" value="<? echo $HTTP_POST_VARS['password']; ?>"> <br> <input type="submit" name="login" value="Log In"> <br> <br> </form> <?php if (isset($login)) { insert(); echo $login; } function insert() { $db = odbc_connect('IdentDatabase', 'root', ''); if(!$db) { echo "An error has occured. Please <a href=\"mailto:drshim@alienmelon.com\">e-mail</a> the text below to me.<br><br>~~~~~~~<br>$PHP_ERROR<br>$db<br>~~~~~~~"; } $SQLQuery = "SELECT fldID FROM tblUsers WHERE fldUsername = '$username' AND fldPassword = '$password'"; $cursor = odbc_exec($db, $SQLQuery); if (!$cursor) { echo "An error has occured. Please <a href=\"mailto:drshim@alienmelon.com\">e-mail</a> the text below to me.<br><br>~~~~~~~~<br>" . odbc_errormsg($db) . "<br>~~~~~~~"; } } ?> </body> </html> "Jason Wong" <php-general@gremlins.com.hk> wrote in message news:php.general-88799@news.php.net... On Sunday 17 March 2002 12:04, Dr. Shim wrote: > Sorry about the subject heading. > > I've put in > > <form method="post" action="<?php echo $PHP_SELF; ?>"> > > But still when I click on the "Log In" button, thing happens. Please post the rest of your code and also which version of PHP you're using. -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk /* Your lover will never wish to leave you. */

« previous php.general (#88800) next »