php help not displaying?

Lazarus

New member
Php profile page will not display?
some stuff displays but no profile pic or info from the mysql there are no errors it just wont display some
the php's help me please.

<?php
session_start();

// Connect to database
include_once "scripts/connect_to_mysql.php";
// Now let's initialize vars to be printed to page in the HTML section so our script does not return errors
// they must be initialized in some server environments
$id = "";
$firstname = "";
$middlename = "";
$lastname = "";
$country = "";
$state = "";
$city = "";
$zip = "";
$bio_body = "";
$bio_body = "";
$website = "";
$youtube = "";
$twitter = "";
$facebook = "";
$user_pic = "";
$blabberDisplayList = "";
// If coming from category page
if ($_GET['id']) {

$id = $_GET['id'];

} else if (isset($_SESSION['id'])) {

$id = $_SESSION['id'];

} else {

include_once "index.php";
exit();
}
$id = mysql_real_escape_string($id);
$id = eregi_replace("`", "", $id);
$sql = mysql_query("SELECT * FROM members WHERE id='$id'");

while($row = mysql_fetch_array($sql)){

$firstname = $row["firstname"];
$lastname = $row["lastname"];
$country = $row["country"];
$state = $row["state"];
$city = $row["city"];
$zip = $row["zip"];
$email = $row["email"];
//$email = "<a href=\"mailto:$email\"><u><font color=\"#006600\">Mail</font></u></a>";
$sign_up_date = $row["sign_up_date"];
$sign_up_date = strftime("%b %d, %Y", strtotime($sign_up_date));
$last_log_date = $row["last_log_date"];
$last_log_date = strftime("%b %d, %Y", strtotime($last_log_date));
$bio_body = $row["bio_body"];
$website = $row["website"];
$youtube = $row["youtube"];
$twitter = $row["twitter"];
$facebook = $row["facbook"];
/////// Mechanism to Display Pic. See if they have uploaded a pic or not //////////////////////////
$check_pic = "members/$id/image01.jpg";
$default_pic = "members/0/image01.jpg";
if (file_exists($check_pic)) {
$user_pic = "<img src=\"$check_pic\" width=\"300px\" />"; // forces picture to be 100px wide and no more
} else {
$user_pic = "<img src=\"$default_pic\" width=\"300px\" />"; // forces default picture to be 100px wide and no more
}
/////// Mechanism to Display Youtube Channel or not //////////////////////////
if ($youtube == "") {
$youtubeChannel = "
This user has no YouTube channel yet.";
} else {
$youtubeChannel = ' <script src="http://www.gmodules.com/ig/ifr?url=… . $youtube . '&synd=open&w=290&h=370&title=&border=%2… '; // forces default picture to be 100px wide and no more
}

} // close while loop
//////////////////////////////////////…
$style_sheet = "default";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-…
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="Description" content="Profile for <?php print "$firstname $lastname"; ?>" />
<meta name="Keywords" content="<?php print "$firstname, $lastname, $city, $state, $country"; ?>" />
<meta name="rating" content="General" />
<meta name="ROBOTS" content="All" />
<title>Site Profile for <?php print "$firstname $lastname"; ?></title>
<link href="style_profiles/<?php print "$style_sheet"; ?>.css" rel="stylesheet" type="text/css" />
<link rel="icon" href="http://www.lazarusbenson.com" type="image/x-icon" />
<link rel="shortcut icon" href="http://www.lazarusbenson.com" type="image/x-icon" />
<script src="scripts/swfobject_modified.js" type="text/javascript"></script>
<script src="scripts/swfobject_modified.js" type="text/javascript"></script>
<script src="scripts/swfobject_modified.js" type="text/javascript"></script>
<style type="text/css">
 
Back
Top