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
https://forums.phpfreaks.com/topic/187807-login-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

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