User profile No Data Displayed
Posted: Thu Jun 09, 2011 4:28 pm
Got it ![Smile :)](./images/smilies/icon_e_smile.gif)
Now i run into another issue...the edit_profile form.
is not displaying the values of the fields...
[syntax=php]
<?php
include('core/init.inc.php');
$user_info = fetch_user_info($_SESSION['uid']);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<!--<link rel="stylesheet" type="text/css" href="ext/css/style.css">-->
<style type="text/css">
form {margin: 10px 0px 0px 0px; }
form div {float:left; clear:both; margin:0px 0px 4px 0px; }
label {float:left; width:100px; }
input[type="text"], textarea {float:left; width:400px; }
input[type="submit"] {margin:10px 0px 0px 100px; }
</style>
<title>Edit Your Profile</title>
</head>
<body>
<div>
<?php
?>
</div>
<form action="" method="POST">
<div>
<label for="firstname">Firstname:</label>
<input type="text" name="firstname" id="firstname" value="<?php echo $user_info['firstname']; ?>" />
</div>
<div>
<label for="email">Email:</label>
<input type="text" name="email" id="email" value="<?php echo $user_info['email']; ?>" />
</div>
<div>
<label for="location">Location:</label>
<input type="text" name="location" id="location" value="<?php echo $user_info ['location']; ?>" />
</div>
<div>
<label for="about">About:</label>
<textarea name="about" id="about" rows="14" cols="50"><?php echo $user_info ['about']; ?></textarea>
</div>
<div>
<input type="submit" value="Update" />
</div>
</form>
</body>
</html>
[/syntax]
this is my edit_profile.php page.
what did i do wrong?
remember that i am using it with the register/login script and uses the same database called user_system...
![Smile :)](./images/smilies/icon_e_smile.gif)
Now i run into another issue...the edit_profile form.
is not displaying the values of the fields...
[syntax=php]
<?php
include('core/init.inc.php');
$user_info = fetch_user_info($_SESSION['uid']);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<!--<link rel="stylesheet" type="text/css" href="ext/css/style.css">-->
<style type="text/css">
form {margin: 10px 0px 0px 0px; }
form div {float:left; clear:both; margin:0px 0px 4px 0px; }
label {float:left; width:100px; }
input[type="text"], textarea {float:left; width:400px; }
input[type="submit"] {margin:10px 0px 0px 100px; }
</style>
<title>Edit Your Profile</title>
</head>
<body>
<div>
<?php
?>
</div>
<form action="" method="POST">
<div>
<label for="firstname">Firstname:</label>
<input type="text" name="firstname" id="firstname" value="<?php echo $user_info['firstname']; ?>" />
</div>
<div>
<label for="email">Email:</label>
<input type="text" name="email" id="email" value="<?php echo $user_info['email']; ?>" />
</div>
<div>
<label for="location">Location:</label>
<input type="text" name="location" id="location" value="<?php echo $user_info ['location']; ?>" />
</div>
<div>
<label for="about">About:</label>
<textarea name="about" id="about" rows="14" cols="50"><?php echo $user_info ['about']; ?></textarea>
</div>
<div>
<input type="submit" value="Update" />
</div>
</form>
</body>
</html>
[/syntax]
this is my edit_profile.php page.
what did i do wrong?
remember that i am using it with the register/login script and uses the same database called user_system...