ok got a few pages. login.register,account page and edit profile
looking to know how to actualy log sessions.so that when a user goes to register it will say your already logged in.same with login page and account page
also with edit profile would like to know how to make it so when they edit there profiles it actualy doesnt add a new ID in database and just edits the ID they are signed into.
editprofile.php
<?php
require ("include/global.php");
ini_set('display_errors', false);
//Grab from form
$location = mysql_real_escape_string($_POST[location]);
$gender = $_POST[gender];
$marital = $_POST[marital];
$occupation = $_POST[occupation];
$db = mysql_select_db($dbname,$connection);
$db = mysql_select_db($dbname,$connection);
$sql = "INSERT INTO user (occupation,marital,location,gender) VALUES ('$occupation','$marital','$location','$gender')";
$result = mysql_query($sql) or die( mysql_error() . "<br>SQL = $sql");
echo "Your Profile Has Been Updated";
;
?>
<tr><td><style type="text/css">
body
{ border:1px solid #000000;
background-color: #565656;
font-family: Tahoma;
font-size: 11px;
font-weight: normal;
color: #ffffff;
text-decoration: none;
}
.tcat {
background-image: URL("http://www.mingleville.com/img/navtab1.png");
font-weight: bold;
text-align: center;
color : #FFFFFF;
}
background-image
}
</style>
<html><body>
<form name=reg action=doprofile.php method=post>
<br>
<table class="thinline" border="0" cellpadding="0" cellspacing="2" width="30%">
<tbody><tr>
<td class="tcat" align="center" height="22">Edit Profile!
<tr><td>
Location:<td> <input type=text name=location><br>
<tr><td>
Gender:<td><input type=text name=gender><br>
<tr><td>
Marital Status:<td><input type=text name=marital><br>
<tr><td>
Occupation:<td><input type=text name=occupation><br>
<tr><td colspan=2>
<input type=submit value='Submit'>
</form>
</table>
</body></html>