Jump to content

t-r-a-x

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

t-r-a-x's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I have a problem with a registration/login? If a user goes to login first and tries to login he would get a message that the user isn't in the database or something, but browser would ask him if he'd like to save the pass for that user. If he clicks yes and goes to register the user name and pass are already filled. How can I solve that? P.S. it happens only in firefox
  2. I have a problem, I'd like to write an error from one script in another script, but I don't know how can someone help me?? these are the scripts: <?php session_start(); $submit = $_POST['submit']; $email = strip_tags($_POST['email']); $password = strip_tags($_POST['password']); if ($submit) { if($email) { if($password) { $connect = mysql_connect("localhost","root","") or die ("Couldn't connect to the database"); mysql_select_db (proba,$connect) or die ("Couldn't find database"); $password=md5($password); $query=mysql_query("Select * from login where email='$email' and password='$password'"); if (mysql_num_rows($query)==1) { $_SESSION['email']=$email; header('Location:reg_div.php'); } else { $greska= 'User with this e-mail address and password does not exist!'; header('Location:login.php'); } } else //password echo "You forgot to put in your password!"; } //email else echo "You forgot to put in your E-mail"; }//submit ?> <form action="login_script.php" method="post" name="Log in"> <?php include 'login_script.php'; echo $greska; ?> <table style="border-width:3px;"> <tr> <td colspan="2" align="left"> <label id="cjeline" >Log in</label><br /> <img src="crta.jpg" /> </td> </tr> <tr> <td align="right"> <label id="label">E-mail:</label> </td> <td align="left"> <input name="email" type="text" style="witdh:150px;" maxlength="50"/> </td> </tr> <tr> <td align="right"><label id="label">Password:</label> </td> <td align="left"> <input name="password" type="password" style="witdh:150px;" maxlength="25" /> </td> </tr> <tr> <td colspan="2"> <br /> </td> </tr> </table> <input type="submit" name="submit" value="Log in" /> </form>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.