Help With members profile/control panel
Posted: Thu May 29, 2008 9:15 am
Hi,
Im trying to create a members profile page so that they can see their details.
This is the script that i using on profile.php;
This is what im getting:
What do i need to do to display the info of the member?
Thanks for your help,
tecmeister
Im trying to create a members profile page so that they can see their details.
This is the script that i using on profile.php;
Code: Select all
<?
$dbhost = "localhost";
$dbname = "********;
$dbuser = "*********";
$dbpass = "********";
mysql_connect ($dbhost,$dbuser,$dbpass)or die("Could not connect:".mysql_error());
mysql_select_db($dbname)or die(mysql_error());
/*Retrieve the data*/
$id = $_GET['id'];
$q = mysql_query("SELECT * FROM members WHERE id = '$id'");
$data = mysql_fetch_array($q);
/*To display the data*/
echo "Username: ".$data['username'];
echo "<br>";
echo "Name: ".$data['name'];
echo "<br>";
echo "E-Mail: ".$data['email'];
echo "<br>";
echo "Company: ".$data['company'];
echo "<br>";
echo "Address 1: ".$data['address1'];
echo "<br>";
echo "Address 2: ".$data['address2'];
echo "<br>";
echo "City: ".$data['city'];
echo "<br>";
echo "County: ".$data['email'];
echo "<br>";
echo "Post Code: ".$data['postal'];
echo "<br>";
echo "Phone Number: ".$data['phonenumber'];
echo "<br>";
echo "Mobile Number: ".$data['mobilenumber'];
echo "<br>";
?>
Code: Select all
Username:
Name:
E-Mail:
Company:
Address 1:
Address 2:
City:
County:
Post Code:
Phone Number:
Mobile Number:
Thanks for your help,
tecmeister