PHP Login form problem, need help

Hi,

Code:

<?php

require "connection.php";

$run = mysql_query($query);

$username = $_POST['username'];
$password = $_POST['password'];

$query = "SELECT 'ID' FROM '****' WHERE 'username' = '$username' AND 'password' = '$password' LIMIT 1";
$request = mysql_query($query);
$run = mysql_num_rows($request);

if($run==1){
                mysql_fetch_array($query);
                }
                else{
                        echo "Not Correctos";
                        }

?>

<form id="form1" name="form" method="post" action="login.php">
  <table border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td>Username:</td>
      <td><label for="textfield"></label>
      <input type="text" name="username" id="textfield" /></td>
    </tr>
    <tr>
      <td>Password:</td>
      <td><label for="textfield2"></label>
      <input type="text" name="password" id="textfield2" /></td>
    </tr>
  </table>
  <p>
    <input type="submit" name="button" id="button" value="Login" />
  </p>
</form>


Whats wrong with this PHP code it doesn’t work. I would like to login but I can’t is there anything wrong

FarrisFahad

View full post on Tycoon Talk

, , , ,

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

PHP Login form problem, need help

Hi,

Code:

<?php

require "connection.php";

$run = mysql_query($query);

$username = $_POST['username'];
$password = $_POST['password'];

$query = "SELECT 'ID' FROM '****' WHERE 'username' = '$username' AND 'password' = '$password' LIMIT 1";
$request = mysql_query($query);
$run = mysql_num_rows($request);

if($run==1){
                mysql_fetch_array($query);
                }
                else{
                        echo "Not Correctos";
                        }

?>

<form id="form1" name="form" method="post" action="login.php">
  <table border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td>Username:</td>
      <td><label for="textfield"></label>
      <input type="text" name="username" id="textfield" /></td>
    </tr>
    <tr>
      <td>Password:</td>
      <td><label for="textfield2"></label>
      <input type="text" name="password" id="textfield2" /></td>
    </tr>
  </table>
  <p>
    <input type="submit" name="button" id="button" value="Login" />
  </p>
</form>


Whats wrong with this PHP code it doesn’t work. I would like to login but I can’t is there anything wrong

FarrisFahad

View full post on Tycoon Talk

, , , ,

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

PHP Login form problem, need help

Hi,

Code:

<?php

require "connection.php";

$run = mysql_query($query);

$username = $_POST['username'];
$password = $_POST['password'];

$query = "SELECT 'ID' FROM '****' WHERE 'username' = '$username' AND 'password' = '$password' LIMIT 1";
$request = mysql_query($query);
$run = mysql_num_rows($request);

if($run==1){
                mysql_fetch_array($query);
                }
                else{
                        echo "Not Correctos";
                        }

?>

<form id="form1" name="form" method="post" action="login.php">
  <table border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td>Username:</td>
      <td><label for="textfield"></label>
      <input type="text" name="username" id="textfield" /></td>
    </tr>
    <tr>
      <td>Password:</td>
      <td><label for="textfield2"></label>
      <input type="text" name="password" id="textfield2" /></td>
    </tr>
  </table>
  <p>
    <input type="submit" name="button" id="button" value="Login" />
  </p>
</form>


Whats wrong with this PHP code it doesn’t work. I would like to login but I can’t is there anything wrong

FarrisFahad

View full post on Tycoon Talk

, , , ,

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Get Adobe Flash playerPlugin by wpburn.com wordpress themes


RSS Site FeedRSS Site Feed

© 1992-2011 DC2NET™, Inc. All Rights Reserved