I was struggling some days ago to make the submitted data to stay in the My profile page and made a little progress on my own but got stuck and i need professional help.
This is my new "myprofile.php" script (where the data is submitted)
PHP Code:
<html>
<body>
<?php
$con 
mysql_connect("localhost","myhoo22c_blade","opinci23");
if (!
$con)
  {
  die(
'Could not connect: ' mysql_error());
  }
mysql_select_db("myhoo22c_bladesdb"$con);
$sql="INSERT INTO profile (FirstName, LastName, Dateofbirth, Gender, Country, City, AboutMe, Email)
VALUES
('
$_GET[fname]','$_GET[lname]','$_GET[day]$_GET[month]$_GET[year]','$GET_[gender]','$_GET[country]','$_GET[city]','$_GET[aboutme]','$_GET[email]')";
if (!
mysql_query($sql,$con))
  {
  die(
'Error: ' mysql_error());
  }
$result mysql_query("SELECT * FROM profile");
while(
$row mysql_fetch_array($result))
  {
  echo 
'<span style="color:#E3E9F2;font-family:Courier New;font-size:13px;font-weight:bold;">First name:</span><span style="color:#EFF3F7;font-family:Courier New;font-size:13px;">  ' $row['FirstName'] . '</span>';   
  echo 
"<br />";
  echo 
"<br />";
  echo 
'<span style="color:#E3E9F2;font-family:Courier New;font-size:13px;font-weight:bold;">Last name:</span><span style="color:#EFF3F7;font-family:Courier New;font-size:13px;">  ' $row['LastName'] . '</span>';   
  echo 
"<br />";
  echo 
"<br />";
  echo 
'<span style="color:#E3E9F2;font-family:Courier New;font-size:13px;font-weight:bold;">Date of birth:</span><span style="color:#EFF3F7;font-family:Courier New;font-size:13px;">  ' $row['Dateofbirth'] . '</span>';   
  echo 
"<br />";
  echo 
"<br />";
  echo 
'<span style="color:#E3E9F2;font-family:Courier New;font-size:13px;font-weight:bold;">Gender:</span><span style="color:#EFF3F7;font-family:Courier New;font-size:13px;">  ' $row['Gender'] . '</span>';   
  echo 
"<br />";
  echo 
"<br />";
  echo 
'<span style="color:#E3E9F2;font-family:Courier New;font-size:13px;font-weight:bold;">Country:</span><span style="color:#EFF3F7;font-family:Courier New;font-size:13px;">  ' $row['Country'] . '</span>';   
  echo 
"<br />";
  echo 
"<br />";
  echo 
'<span style="color:#E3E9F2;font-family:Courier New;font-size:13px;font-weight:bold;">City:</span><span style="color:#EFF3F7;font-family:Courier New;font-size:13px;">  ' $row['City'] . '</span>';   
  echo 
"<br />";
  echo 
"<br />";
  echo 
'<span style="color:#E3E9F2;font-family:Courier New;font-size:13px;font-weight:bold;">About me:</span><span style="color:#EFF3F7;font-family:Courier New;font-size:13px;">  ' $row['Aboutme'] . '</span>';   
  echo 
"<br />";
  echo 
"<br />";
  echo 
'<span style="color:#E3E9F2;font-family:Courier New;font-size:13px;font-weight:bold;">Email:</span><span style="color:#EFF3F7;font-family:Courier New;font-size:13px;">  ' $row['Email'] . '</span>';   
  echo 
"<br />";
  echo 
"<br />";
  }
mysql_close($con);
?> 
</body>
</html>
Now...when a user logs in, the My profile and Edit profile links appear. If he wants to take a look at the My profile just to check it out, instead of a blank layer with the title My profile, it appears:
First Name:
Last Name:
....... etc (the My profile title doesn't disappear)
and they stay there. If he reloads the page or exits the page and enters again, they appear over and over again. I think it's because that While{}, it makes things repeat themselves every time someone enters My profile page. If the user enters in the Edit profile first and enters his data, after submitting, he is directed to My profile page where the data seems to appear (except "About me:" which is a text area and "Gender:" where i've put a radio button; don't know why the data doesn't appear) and stay there. This is my little progress i was talking about, the data stays there but if he reloads or re-enters the page, the fields appear once more, every time the page is accessed.
Saw on the internet that some say i should use if (isset ['submit']), $_SESSION, cookies..but since i don't know coding that good i don't know how and where to implement them and can't take all the scripts from the internet because they are so different, almost unique and can't implement them into my script, i only take bits and pieces and put them together in my script until i reach dead end like now. Checked tutorials but without examples they are hard to understand...
Hope you understood my problem and can help out. Thanks!