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:[EMAIL PROTECTED]\";>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:[EMAIL PROTECTED]\";>e-mail</a> the text below to
me.<br><br>~~~~~~~~<br>" . odbc_errormsg($db) . "<br>~~~~~~~";
  }
 }
   ?>
</body>
</html>



"Jason Wong" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
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.
*/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to