Jump to content

sanmagician

Members
  • Posts

    12
  • Joined

  • Last visited

    Never

Everything posted by sanmagician

  1. Will not redirect :S maybe u want to see the login.php <html> <body> <div> <p>You must login to view this page. Enter your username and password below and hit submit:</p> <form method="post" action="../login_process.php"> <p>Username:<br> <input name="username" type="text" Cid="username"> <p>Password:<br> <input name="password" type="password" id="password"> </p> <p> <input name="login" type="submit" id="login" value="Submit"> </p> </form> <p>Didn't get your validation email? <a href="resend.php">Click here</a> to resend the validation email.</p> <p>Need an account? <a href="/register.php">Click here</a> to register, it's completely free! </p> </div> </div> </body> </html>
  2. Just getting sytax error in dw cs5 header("Location: user/member.php"); <- it shud redirect but does not
  3. But when i was thinking over it can i use a html redirect can u show me in the code?
  4. The code i sent before is the login_process.php but the sourcecode will not show up Edit: Sourcecode will not show up in the browser but it will show up in the file
  5. Just a white page stops here http://localhost/login_process.php <- white page and no errors does not redirect :S
  6. The php code won`t redirect to user/member.php need some help <?php session_start(); include 'includes/database.php'; if(isset($_POST['login'])) { $username = trim(addslashes($_POST['username'])); $password = md5(trim($_POST['password'])); $query = mysql_query("SELECT * FROM Users WHERE Username = '$username' AND Password = '$password' LIMIT 1") or die(mysql_error()); $row = mysql_fetch_array($query); if(mysql_num_rows($query) > 0) { if($row['Activated'] > 0) { $_SESSION['s_logged_n'] = 'true'; $_SESSION['s_username'] = $username; $_SESSION['s_name'] = $row['Name']; header("Location: user/member.php"); } else { echo "You have to activate your account!"; } } } else { echo "You have to fill out the login form!"; } ?>
  7. Updated code nothing to do whit the unexpected end <?php include 'includes/database.php'; if(isset($_POST['submit'])) { $username = addslashes(trim($_POST['username'])); $email = addslashes(trim($_POST['email'])); $pass = addslashes(trim($_POST['password'])); $conf = addslashes(trim($_POST['confirm'])); $ip = $_SERVER['REMOTE_ADDR']; $date = date("d, m y"); if ( $_POST['password'] == $_POST['confirm'] ) {}else{ echo '<script>alert("Your passwords were not the same, please enter the same password in each field.");</script>'; echo '<script>history.back(1);</script>'; exit; } $password = md5($pass); if ((((( empty($username) ) || ( empty($email) ) || ( empty($password) ))))) { echo '<script>alert("One or more fields was left empty, please try again.");</script>'; echo '<script>history.back(1);</script>'; exit; } if((!strstr($email , "@")) || (!strstr($email , "."))) { echo '<script>alert("The email you have entred is an invalid email address.")';</script>; echo '<script>history.back(1);</script>'; exit; } $actkey = mt_rand(1, 500).'f78dj899dd'; $act = sha1($actkey); $query = mysql_query("INSERT INTO Users (Username, Password, Email, Date, IP, Actkey) VALUES ('$username','$email','$date','@ip','$act')") or die(mysql_error()); $send = mail($email , "Registration Confirmation","Thank you for registrering with EthicGamer.com\n\nYour username and password is below, along with details on how to activate your account.n\nUser:".$username."\nPass:".$pass."\n\nClick the link below to activate your account:\nhttp://ethicgamers.com/activate.php?id=".$act."\n\nPlease do not reply, this is an automated mailer.\n\nThanks","FROM: activate@ethicgamers.com"); if(($query)&&($send)) { echo ' <html> <head> </head> <body> <div> <p>Thank you for registering, you will recieve an email soon with your login details and your activation link so that you can activate your account.</p> <p><a href="login.php">Click here</a> to login once you have activated.</p> </div> </body> </html> '; } else { echo ' <html> <body> <div> <p>We are sorry, there appears to be a problem with our script at the moment.</p> <p>Your data was not lost. Username: '.$username.' | Password: '.$pass.' | Email: '.$email.'</p> <p>Please try again later.</p> </div> </body> </html> '; } } else { ?> [attachment deleted by admin]
  8. Okay i have a probleme in the script and that did nnot help me mutch, Can you make it more detailed?
  9. Parse error: syntax error, unexpected $end in C:\xampp\htdocs\register_process.php on line 97 Here is the script hope fully someone can help me i attached the script too Shud not be a hard job <?php include 'includes/database.php'; if(isset($_POST['submit'])) { $username = addslashes(trim($_POST['username'])); $email = addslashes(trim($_POST['email'])); $pass = addslashes(trim($_POST['password'])); $conf = addslashes(trim($_POST['confirm'])); $ip = $_SERVER['REMOTE_ADDR']; $date = date("d, m y"); if ( $_POST['password'] == $_POST['confirm'] ) {}else{ echo '<script>alert("Your passwords were not the same, please enter the same password in each field.");</script>'; echo '<script>history.back(1);</script>'; exit; } $password = md5($pass); if ((((( empty($first) ) || ( empty($surname) ) || ( empty($username) ) || ( empty($email) ) || ( empty($password) ))))) { echo '<script>alert("One or more fields was left empty, please try again.");</script>'; echo '<script>history.back(1);</script>'; exit; } if((!strstr($email , "@")) || (!strstr($email , "."))) { echo '<script>alert("The email you have entred is an invalid email address.")';</script>; echo '<script>history.back(1);</script>'; exit; } $actkey = mt_rand(1, 500).'f78dj899dd'; $act = sha1($actkey); $query = mysql_query("INSERT INTO Users (Username, Password, Email, Date, IP, Actkey) VALUES ('$username','$email','$date','@ip','$act')") or die(mysql_error()); $send = mail($email , "Registration Confirmation","Thank you for registrering with EthicGamer.com\n\nYour username and password is below, along with details on how to activate your account.n\nUser:".$username."\nPass:".$pass."\n\nClick the link below to activate your account:\nhttp://ethicgamers.com/activate.php?id=".$act."\n\nPlease do not reply, this is an automated mailer.\n\nThanks","FROM: activate@ethicgamers.com"); if(($query)&&($send)) { echo ' <html> <head> </head> <body> <div> <p>Thank you for registering, you will recieve an email soon with your login details and your activation link so that you can activate your account.</p> <p><a href="login.php">Click here</a> to login once you have activated.</p> </div> </body> </html> '; } else { echo ' <html> <body> <div> <p>We are sorry, there appears to be a problem with our script at the moment.</p> <p>Your data was not lost. Username: '.$username.' | Password: '.$pass.' | Email: '.$email.'</p> <p>Please try again later.</p> </div> </body> </html> '; } } else { ?> [attachment deleted by admin]
  10. Parse error: syntax error, unexpected $end in C:\xampp\htdocs\register_process.php on line 97 Here is the script hope fully someone can help me i attached the script too <?php include 'includes/database.php'; if(isset($_POST['submit'])) { $username = addslashes(trim($_POST['username'])); $email = addslashes(trim($_POST['email'])); $pass = addslashes(trim($_POST['password'])); $conf = addslashes(trim($_POST['confirm'])); $ip = $_SERVER['REMOTE_ADDR']; $date = date("d, m y"); if ( $_POST['password'] == $_POST['confirm'] ) {}else{ echo '<script>alert("Your passwords were not the same, please enter the same password in each field.");</script>'; echo '<script>history.back(1);</script>'; exit; } $password = md5($pass); if ((((( empty($first) ) || ( empty($surname) ) || ( empty($username) ) || ( empty($email) ) || ( empty($password) ))))) { echo '<script>alert("One or more fields was left empty, please try again.");</script>'; echo '<script>history.back(1);</script>'; exit; } if((!strstr($email , "@")) || (!strstr($email , "."))) { echo '<script>alert("The email you have entred is an invalid email address.")';</script>; echo '<script>history.back(1);</script>'; exit; } $actkey = mt_rand(1, 500).'f78dj899dd'; $act = sha1($actkey); $query = mysql_query("INSERT INTO Users (Username, Password, Email, Date, IP, Actkey) VALUES ('$username','$email','$date','@ip','$act')") or die(mysql_error()); $send = mail($email , "Registration Confirmation","Thank you for registrering with EthicGamer.com\n\nYour username and password is below, along with details on how to activate your account.n\nUser:".$username."\nPass:".$pass."\n\nClick the link below to activate your account:\nhttp://ethicgamers.com/activate.php?id=".$act."\n\nPlease do not reply, this is an automated mailer.\n\nThanks","FROM: activate@ethicgamers.com"); if(($query)&&($send)) { echo ' <html> <head> </head> <body> <div> <p>Thank you for registering, you will recieve an email soon with your login details and your activation link so that you can activate your account.</p> <p><a href="login.php">Click here</a> to login once you have activated.</p> </div> </body> </html> '; } else { echo ' <html> <body> <div> <p>We are sorry, there appears to be a problem with our script at the moment.</p> <p>Your data was not lost. Username: '.$username.' | Password: '.$pass.' | Email: '.$email.'</p> <p>Please try again later.</p> </div> </body> </html> '; } } else { echo "You have to fill out the form first!"; } ?> [attachment deleted by admin]
×
×
  • 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.