<?php echo ini_set('display_errors', 1);

<?php echo ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);

I have this code and i am getting 1 on page what does mean that

The first line is echoing the result of a function.

Further details can be found here:


Log in always go on same page after i try to log in should go on two different pages.

That statement is not very helpful by itself. I see nothing in this thread that has anything to do with a login.

Could you please give us some more information - maybe the code you are using to log in, and how you have redirected the user to the two different pages?

if (isset($_POST['Submit1'])) {
 $db = mysqli_connect('localhost', 'root', '', 'cars123');
 $email =$_POST['email'];
$password=$_POST['password']  ;
  $email = mysqli_real_escape_string($db, $_POST['email']);
  $password = mysqli_real_escape_string($db, $_POST['password']);

  if (empty($email)) {
  	array_push($errors, "Username is required");
  if (empty($password)) {
  	array_push($errors, "Password is required");

  if (count($errors) == 0) {
  	$password = md5($password);
  	$query = "SELECT * FROM customer WHERE email='$email' AND password='$password'";
  	$results = mysqli_query($db, $query);
  	if (mysqli_num_rows($results) == 1) {
  	    $_SESSION['email'] ==  $email;
	  $_SESSION['password'] ==  $password;
  	  $_SESSION['success'] =  "<script language=\"JavaScript\">{ 
  	  header('location: index.php');
  	}else {
  		  echo "<script language=\"JavaScript\">{ 
<input name="email" type="text" class="x"  value=""       id="email"><?Php ; // You can set the value however you like." ?>
                                            <span class="linije4">////////////////////////////////////////////</span>
                                            <span class="control-label">Password</span>:
                                            <input name="password" type="text" class="x" id="password">
                                            	<span class="linije4">/////////////////////////////////////////////////////////////////////////////////</span>
                                            	<input name="Submit1" type="submit"  class="submit" id="Submit1" value="Submit">

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.