PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
<?$sql = "SELECT * FROM user WHERE $userid= $profileid"; ?>
<b>User Details:</b><br>
<b>Name:</b> <?php (print($user_first_name) WHERE $userid = $profileid) ?>
well i figured its an easy fix for someone who knows what they are doing and i have a lot of pressure on me to get this code done so I was just trying to see if anyone can help..... I help people all the time....
You realize your first query does nothing for your script since you override immediately with the result resource from another query? And you should probably be using regular opening php tags instead of short tags.
As for all the $user* variables you are using... where are those given their values from? I can't see them being set anywhere in the script.
// Get user Information from userbase db
$info2 = mysql_query("SELECT * FROM `userbase` WHERE email_address = '{$email_address}' ");
if(!$info2){
die("Could not get user info");
}
$info2 = mysql_fetch_array($info2);
$userid = $info2['userid'];
// Get other required user infomation
$first_name = $info2['first_name'];
$last_name = $info2['last_name'];
$email_address = $info2['email_address'];
$party = $info2['party'];
$age = $info2['age'];
$location = $info2['location'];
$gender = $info2['gender'];
// Fix for any place you put session instead of just the variable.
$_SESSION['first_name'] = $first_name;
$_SESSION['last_name'] = $last_name;
$_SESSION['email_address'] = $email_address;
$_SESSION['party'] = $party;
$_SESSION['age'] = $age;
$_SESSION['location'] = $location;
$_SESSION['gender'] = $gender;
am i doing anything stupid on any of these codes? The rest should work