Problems with User Profile
Posted: Sun May 08, 2011 2:03 pm
Hey,
i've send you a massage in youtube and now i'm here...so
if i open profile.php with my browser there are these two warnings/notices:
Notice: Undefined index: uid in C:\xampp\htdocs\PHP User Profile\profile.php on line 5
Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\PHP User Profile\user.php on line 32
i dont know what's wrong...maybe you can send me your scripts and i take a look and find the mistake...
my e-mail address is : matthiashaselmaier@hotmail.de
thx
the code:
i've send you a massage in youtube and now i'm here...so
if i open profile.php with my browser there are these two warnings/notices:
Notice: Undefined index: uid in C:\xampp\htdocs\PHP User Profile\profile.php on line 5
Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\PHP User Profile\user.php on line 32
i dont know what's wrong...maybe you can send me your scripts and i take a look and find the mistake...
my e-mail address is : matthiashaselmaier@hotmail.de
thx
the code:
<?php include('init.php'); $user_info = fetch_user_info($_GET['uid']); ?> <html> <head> <meta http-equiv="content-type" content="text/html"; charset="utf-8" /> <title><?php echo $user_info['username']; ?>'s Profile</title> </head> <body> <div> <?php if ($user_info === false){ echo 'That user does net exist!'; } else{ ?> <h1><?php echo $user_info['firstname']; ?> <?php echo $user_info['lastname']; ?></h1> <p>Username: <?php echo $user_info['username']; ?></p> <p>Gender: <?php echo ($user_info['gender'] == 1) ? 'Male' : 'Female'; ?></p> <p>Email: <?php echo $user_info['email']; ?></p> <p>Location: <?php echo $user_info['location']; ?></p> <p><?php echo $user_info['about']; ?></p> <?php } ?> </div> </body> </html>