how to grab these information from Mysql and put them into text areas and inputs? I can echo them but it's hard for me to insert them to inputs, any suggestions and ideas would be really helpful..
Thanks
<?php
$ip = $_SERVER['REMOTE_ADDR'];
$username = $session->username;
$email = $session->userinfo['email'];
$userid = "$session->userid";
$user = "$session->username";
include 'config.php';
if($_POST['submit'] == "Send")
{
mysql_query("INSERT INTO profiles (email, username, firstname, lastname, gender, location, birthday, ip, city, occupation, homepage, phone, address, icq, msn, yahoo, interests) VALUES('$email', '$username','$fname', '$lname', '$genderx', '$location', '$birthday', '$ip', '$city', '$occupation', '$homepage', '$phone', '$address', '$icq', '$msn', '$yahoo', '$interests')");
}
mysql_query("SELECT * FROM profiles");
$row = mysql_fetch_array($query);
$username = $row['username'];
$firstname = $row['firstname'];
$lastname = $row['lastname'];
$email = $row['email'];
$gender = $row['gender'];
$location = $row['location'];
$birthday = $row['birthday'];
$ip = $row['ip'];
$city = $row['city'];
$occupation = $row['occupation'];
$homepage = $row['homepage'];
$phone = $row['phone'];
$address = $row['address'];
$icq = $row['icq'];
$msn = $row['msn'];
$yahoo = $row['yahoo'];
$interests = $row['interests'];
echo("Hello, $username, $firstname $lastname, $email, $gender, $birthday, $location, $ip, $city, $occupation, $homepage, $phone, $address, $icq, $msn, $yahoo, $interests");
?>