monkeypaw201 Posted February 18, 2008 Share Posted February 18, 2008 So, i have a page with the following code on it, and it just spits at me a blank page. No errors, no echos no nothing. When i view the source code, its empty... Im lost ??? <?php if($_POST['password'] == $_POST['password2']) { //If Passwords Match //Query for the latest Callsign mysql_select_db($database_caliregional, $caliregional); $query_PID = "SELECT * FROM users ORDER BY pilot_id DESC"; $PID = mysql_query($query_PID, $caliregional) or die(mysql_error()); $row_PID = mysql_fetch_assoc($PID); $totalRows_PID = mysql_num_rows($PID); //Create un-posted variables $pilot_id = $row_PID['pilot_id']+1; $date_hired = date("now"); $password = md5($_POST['password']); $first_initial = substr($_POST['first_name']; $forum_name = $first_initial . $_POST['last_name']; $full_name = $_POST['first_name'] . $_POST['last_name']; $IP = $_SERVER['REMOTE_ADDR']; $password_salt = substr(str_shuffle("1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"),0,4); $fpassword = sha1($_POST['password'] . $password_salt); //Insert Basic User Information $user = mysql_connect("localhost","user","pass"); if (!$user) { die('Could not connect: ' . mysql_error()); }mysql_select_db("database", $user); $sql="INSERT INTO users (pilot_id, first_name, last_name, email, password, date_hired, hub) VALUES ('$pilot_id','$_POST[first_name]','$_POST[last_name]','$_POST[email]','$password','$date_hired','$_POST[hub]')"; if (!mysql_query($sql,$user)) { die('Error: ' . mysql_error()); } if($_POST['forumacc'] == 'No') { //If No Forum Account //Create Forum Account $forum = mysql_connect("localhost","user","pass"); if (!$forum) { die('Could not forumnect: ' . mysql_error()); }mysql_select_db("database", $forum); $sqll="INSERT INTO smf_members (memberName, dateRegistered, realName, passwd, emailAddress, memberIP, memberIP2, ID_POST_GROUP, passwordSalt) VALUES ('$forum_name','$date_hired','$full_name','$fpassword','$_POST[email]','$IP','$IP','4','$password_salt')"; if (!mysql_query($sqll,$forum)) { die('Error: ' . mysql_error()); } } //If No Forum Account echo "Thank you for registering with California Regional. A confirmation e-mail has been sent to the address provided."; } //If Passwords Match else { //If Passwords DONT Match echo "Oops! Looks like the passwords you entered don't match. Please go back and try again."; } //If Passwords DONT Match ?> Link to comment https://forums.phpfreaks.com/topic/91790-blank-page-no-errors/ Share on other sites More sharing options...
phpSensei Posted February 18, 2008 Share Posted February 18, 2008 Line 16 missing ")" $first_initial = substr($_POST['first_name']; make it $first_initial = substr($_POST['first_name']); Link to comment https://forums.phpfreaks.com/topic/91790-blank-page-no-errors/#findComment-470090 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.