if(isset($_POST["name_on_resume"])) {
/* This is all of the submitted data being cleaned and then sent to the database */
$name_on_resume = sAfe($_POST["name_on_resume"]);
$sin_number = sAfe($_POST["sin_number"]);
$address = sAfe($_POST["address"]);
$phone = sAfe($_POST["phone"]);
$email = sAfe($_POST["email"]);
$employed_by = sAfe($_POST["employed_by"]);
$start_date = sAfe($_POST["start_date"]);
$finish_date = sAfe($_POST["finish_date"]);
$department_worked = sAfe($_POST["department_worked"]);
$reason_for_leaving = sAfe($_POST["reason_for_leaving"]);
$reason_for_leaving_details = sAfe($_POST["reason_for_leaving_details"]);
$working_attitude = sAfe($_POST["working_attitude"]);
$working_attitude_details = sAfe($_POST["working_attitude_details"]);
$working_with_others = sAfe($_POST["working_with_others"]);
$working_with_others_details = sAfe($_POST["working_with_others_details"]);
$takes_direction = sAfe($_POST["takes_direction"]);
$takes_direction_details = sAfe($_POST["takes_direction_details"]);
$working_alone = sAfe($_POST["working_alone"]);
$working_alone_details = sAfe($_POST["working_alone_details"]);
$working_in_a_team = sAfe($_POST["working_in_a_team"]);
$working_in_a_team_details = sAfe($_POST["working_in_a_team_details"]);
$respect_for_company_details = sAfe($_POST["respect_for_company_details"]);
$respect_for_co_workers = sAfe($_POST["respect_for_co_workers"]);
$good_qualities = sAfe($_POST["good_qualities"]);
$bad_qualities = sAfe($_POST["bad_qualities"]);
$overview = sAfe($_POST["overview"]);
/* This is all of the cleaned data being entered into the MYSQL database */
$update_sql = "
UPDATE `listing_base` SET
`name_on_resume` = '$name_on_resume',
`sin_number` = '$sin_number',
`address` = '$address',
`phone` = '$phone',
`email` = '$email',
`employed_by` = '$employed_by',
`start_date` = '$start_date',
`finish_date` = '$finish_date',
`department_worked` = '$department_worked',
`reason_for_leaving` = '$reason_for_leaving',
`reason_for_leaving_details` = '$reason_for_leaving_details',
`working_attitude` = '$working_attitude',
`working_attitude_details` = '$working_attitude_details',
`working_with_others` = '$working_with_others',
`working_with_others_details` = '$working_with_others_details',
`takes_direction` = '$takes_direction',
`takes_direction_details` = '$takes_direction_details',
`working_alone` = '$working_alone',
`working_alone_details` = '$working_alone_details',
`working_in_a_team` = '$working_in_a_team',
`working_in_a_team_details` = '$working_in_a_team_details',
`respect_for_company_details` = '$respect_for_company_details',
`respect_for_co_workers` = '$respect_for_co_workers',
`good_qualities` = '$good_qualities',
`bad_qualities` = '$bad_qualities',
`overview` = '$overview'
WHERE
`id` = '$id'
";
$do_sql = mysql_query($update_sql)or die(mysql_errno());
echo "
<a name=\"workerupdated\"></a>
<div class=\"box\">
<h1>Worker Information <span class=\"gray\">Successfully Updated</span></h1>
<p>The information that you have just changed, has been successfully updated. You are being redirected back to the member panel.</p>
</div>
";
echo "<meta http-equiv=\"refresh\" content=\"3;url=index.php?page=library/member&act=account_panel\">";
} else {
So here's my problem. Yes the $id is definied, and so is the function sAfe();
Now I tryed taking out the mysql_query part of the code so it would update and then the 'success message' displayed. but when I add the mysql_query back and try to update the sql, then the page when submitted is blank, nothing happends, nothing is displayed.
Any ideas? Thanks
Edited by Braunson, 07 July 2007 - 07:17 PM.
