Jump to content

Blank Page... No Errors??


monkeypaw201

Recommended Posts

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