PHP Code:
<?php
include 'init.php';
if (!is_authed())
{
header("Location: http://xxxx/wewewe/wee.ph");
exit;
}
$ID = $_SESSION['ID'];
$results = mysql_query("SELECT * FROM `WorkExperience` WHERE ID=$ID");
$row = mysql_num_rows($results);
if($row == 0)
{
mysql_query("INSERT INTO `WorkExperience` (ID) VALUES ('$ID')");
}
mysql_query($query);
}
if($_POST['next'])
{
header("Location: gotonextpage.php");
exit();
}
$query = "SELECT * FROM `WorkExperience` WHERE ID=$ID";
$results = mysql_query($query);
$data = mysql_fetch_array($results);
$CountryOfEmployment = $data['CountryOfEmployment'];
$CommencementDay = $data['CommencementDay'];
$CommencementMonth = $data['CommencementMonth'];
$CommencementYear = $data['CommencementYear'];
?>
This should work for you. Obviously change the SQL to suit your database, etc.
Bookmarks