Jump to content

Login help


Goop3630

Recommended Posts

Hello, I am using a Flash header for my site (don't complain about it) and I can't get the login to work, I finally got it to actually check the database for the information but now it says that the information is not there although I know it is because I looked.

 

 

<?php

 

if ($_POST['email'] !=""){

 

include_once "connect_to_mysql.php";

 

$email = $_POST['email'];

$pass = $_POST['pass'];

 

$email = strip_tags($email);

$pass = strip_tags($pass);

$emial = mysql_real_escape_string($email);

$pass = mysql_real_escape_string($pass);

$email = eregi_replace("`","",$email);

$pass = eregi("`","",$pass);

 

$pass = md5($pass);

 

 

$sql = "SELECT * FROM `myMembers` WHERE email='$email' AND password='$pass' AND email_activated='1'";

$result = mysql_query($sql);

$count = mysql_num_rows($result);

 

if($count > 0){

 

 

while($row = mysql_fetch_array($result)){

 

session_start();

 

$id = $account["id"];

session_register('id');

$_SESSION['id']=$id;

 

$SLfirstname = $account["SLfirstname"];

session_register('SLfirstname');

$_SESSION['SLfirstname']=$SLfirstname;

 

$email = $account["email"];

session_register('email');

$_SESSION['email']=$email;

 

$my_msg = "all_good";

print "return_mesg=$my_msg&id=$id$memeber_name=$SLfirstname";

 

}

 

} else {

$my_msg = "no_good";

print "return_msg=$my_msg";

exit();

}

}

?>

 

[attachment deleted by admin]

Link to comment
Share on other sites

you misspelled email.

 

$emial = mysql_real_escape_string($email);

 

What version of php are you using.  I ask because you are using session_register().

if register globals is off session_register() will not work and you shouldn't use register globals anyway.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.