Techno Posted April 20, 2008 Report Posted April 20, 2008 Man ir tāda problēma ar manu login scriprtu kad es logojos ieksha pec ielogoshanas vajazdetu pariet uz memberspage manu bet ta vieta paradas vienkarshi tukša lapa un kad ierakstu nepareizu loginu vajazdetu paradit ka bad login bet ta vieta ari tukša lapa parādās . lūdzu palīdzat reku bus scripts mana login.php <?php //Database Information $dbhost = "localhost"; $dbname = "useri"; $dbuser = "root"; $dbpass = ":D :D :D"; //Connect to database mysql_connect ( $dbhost, $dbuser, $dbpass)or die("Could not connect: ".mysql_error()); mysql_select_db($dbname) or die(mysql_error()); session_start(); $username = $_POST[‘username’]; $password = md5($_POST[‘password’]); $query = “select * from users where username=’$username’ and password=’$password’”; $result = mysql_query($query); if (mysql_num_rows($result) != 1) { $error = “Bad Login”; include “login.html”; } else { $_SESSION[‘username’] = “$username”; include “memberspage.php”; } ?>
iall Posted April 20, 2008 Report Posted April 20, 2008 (edited) $_SESSION[‘username’] = “$username”; header('Location: memberspage.php'); Šādi nevar? Edited April 20, 2008 by iall
Recommended Posts