Jump to content

Joshv1288

Members
  • Posts

    30
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Joshv1288's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. ok everything works now but it keeps sending me back the register.php everytime i hit sumbit its suppose to send me to profile.php
  2. Parse error: syntax error, unexpected $end in /home/h3swat/public_html/livereg.php on line 134 i get this now its the ?> at the end and the name of my submit button is submit
  3. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> </head> <body> this is b4 it
  4. <?php $url = "http://h3swatlg.exofire.net/profile.php"; $user = $_POST['username']; $pass = $_POST['password']; $pass2 = $_POST['password2']; $name = $_POST['name']; $age = $_POST['age']; $loc = $_POST['loc']; $gender = $_POST['gender']; $email = $_POST['email']; $gt = $_POST['GT']; //PASSWORD VERIFICATION if (($pass)!=($pass2)) { header("Location: register.php"); Die(); } //EMAIL VERIFICATION function CheckMail($email) { if(eregi("^[0-9a-z]([-_.]?[0-9a-z])*@[0-9a-z]([-.]?[0-9a-z])*\.[a-z]{2,4}$",$email)) { return true; } else { return false; } } if ((empty($email)) || (!CheckMail($email))) { header("Location: register.php"); Die(); } //Age VERIFICATION function CheckAge($age) { if (eregi("[0-9]", $age)) { return true; } else { return false; } } if ((empty($age)) || (!CheckAge($age)) || (strlen($age)!=2)) { header("Location: register.php"); Die(); } //NAME VERIFICATION if (empty($name)) { header("Location: register.php"); Die(); } //GENDER VERIFICATION if (empty($gender)) { header("Location: register.php"); Die(); } //LOCATION VERIFICATION if (empty($loc)) { header("Location: register.php"); Die(); } //GAMERSTAG VERIFICATION if (empty($gt)) { header("Location: register.php"); Die(); } //USER AND PASSWORD LENGTH CHECK $min_lenngth = 6; / if(strlen($user) < $min_lenngth || strlen($pass) < $min_lenngth) { header("Location: register.php"); Die(); } //Connects to Database $connection = mysql_connect("localhost", "h3swat_test", "kwdb39"); @mysql_select_db("h3swat_test") or die( "Unable to select database"); $check = mysql_query("select username from users where username=\"$user\""); $returned = mysql_fetch_array($check); if(!empty($returned)) { header("Location: register.php"); mysql_close($connection); } else { $check = mysql_query("select email from users where email=\"$email\""); $returned = mysql_fetch_array($check); if(!empty($returned)) { header("Location: register.php"); mysql_close($link); // Die(); } else / $pass=md5($pass); / $request = "INSERT INTO users values(NULL,\'$name\',\'$user\',\'$pass\', \'$email\',\'$gt\',\'$age\',\'$gender\',\'$loc\')"; $results = mysql_query($request); if($results) { header("Location: profile.php"); } else { header("Location: register.php"); } mysql_close($link); Die(); echo '<META HTTP-EQUIV=Refresh CONTENT="0; URL=.$url.">'; ?> here ya go
  5. yea well the part where the header comes in
  6. //PASSWORD VERIFICATION if (($pass)!=($pass2)) { header("Location: register.php"); Die(); } //EMAIL VERIFICATION function CheckMail($email) { if(eregi("^[0-9a-z]([-_.]?[0-9a-z])*@[0-9a-z]([-.]?[0-9a-z])*\.[a-z]{2,4}$",$email)) { return true; } else { return false; } } if ((empty($email)) || (!CheckMail($email))) { header("Location: register.php"); Die(); } //Age VERIFICATION function CheckAge($age) { if (eregi("[0-9]", $age)) { return true; } else { return false; } } if ((empty($age)) || (!CheckAge($age)) || (strlen($age)!=2)) { header("Location: register.php"); Die(); } //NAME VERIFICATION if (empty($name)) { header("Location: register.php"); Die(); } //GENDER VERIFICATION if (empty($gender)) { header("Location: register.php"); Die(); } //LOCATION VERIFICATION if (empty($loc)) { header("Location: register.php"); Die(); } //GAMERSTAG VERIFICATION if (empty($gt)) { header("Location: register.php"); Die(); } //USER AND PASSWORD LENGTH CHECK $min_lenngth = 6; / if(strlen($user) < $min_lenngth || strlen($pass) < $min_lenngth) { header("Location: register.php"); Die(); } //Connects to Database $connection = mysql_connect("localhost", "h3swat_test", "kwdb39"); @mysql_select_db("h3swat_test") or die( "Unable to select database"); $check = mysql_query("select username from users where username=\"$user\""); $returned = mysql_fetch_array($check); if(!empty($returned)) { header("Location: register.php"); mysql_close($connection); } else { $check = mysql_query("select email from users where email=\"$email\""); $returned = mysql_fetch_array($check); if(!empty($returned)) { header("Location: register.php"); mysql_close($link); // Die(); } else / $pass=md5($pass); / $request = "INSERT INTO users values(NULL,\'$name\',\'$user\',\'$pass\', \'$email\',\'$gt\',\'$age\',\'$gender\',\'$loc\')"; $results = mysql_query($request); if($results) { header("Location: profile.php"); } else { header("Location: register.php"); } mysql_close($link); Die(); echo '<META HTTP-EQUIV=Refresh CONTENT="0; URL=.$url.">';[/quote] Wat do i do with all this then sry im not really understanding output
  7. ok i dnt understand that can u tell me in simple terms
  8. ok that fixed all that now i get this Warning: Cannot modify header information - headers already sent by (output started at /home/h3swat/public_html/livereg.php:9) in /home/h3swat/public_html/livereg.php on line 87 if (empty($gender)) { header("Location: error-gender.php"); //the user will be sent to this page Die(); }
  9. this file is like big so i just post to the end of the varibles the rest just verify the user has wrote in the input fields
  10. still gettin the same error
  11. line 13 at the top $user = $_POST[\'username\']; $pass = $_POST[\'password\']; $pass2 = $_POST[\'password2\']; $name = $_POST[\'name\']; $age = $_POST[\'age\']; $loc = $_POST[\'loc\']; $gender = $_POST[\'gender\']; $email = $_POST[\'email\']; $gt = $_POST[\'GT\'];
  12. ok fixed that now i get this Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/h3swat/public_html/livereg.php on line 13 line 13 at the top $user = $_POST[\'username\']; $pass = $_POST[\'password\']; $pass2 = $_POST[\'password2\']; $name = $_POST[\'name\']; $age = $_POST[\'age\']; $loc = $_POST[\'loc\']; $gender = $_POST[\'gender\']; $email = $_POST[\'email\']; $gt = $_POST[\'GT\'];
  13. its there hers the whole code updated for my database $sql = "SELECT username FROM users"; $result = mysql_query($sql); if ($result) { if (mysql_num_rows($result) > 0) { // here we loop through each member in the database while ($row = mysql_fetch_assoc($result)) { /// creating a link out of there uname, and passing there uname through the url. echo "<a href=\"profiles.php?member={$row['username']}\">{$row['username']}</a><br />"; } } else { echo "No users found"; } else { echo "Query failed ".mysql_error(); } ?>
  14. im using that code and i get this error Parse error: syntax error, unexpected T_ELSE in /home/h3swat/public_html/index.php on line 42 } else { echo "Query failed ". mysql_error(); }
  15. Warning: Unexpected character in input: ''' (ASCII=39) state=1 in /home/h3swat/public_html/livereg.php on line 10 Parse error: syntax error, unexpected ':' in /home/h3swat/public_html/livereg.php on line 10 line 10 $url = 'http://h3swatlg.exofire.net/profile.php\'; HELP?
×
×
  • 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.