Well I tried to ask this on stackoverflow but damn near had my head tore off because I am new trying to learn php/mysql. Man they are not newb friendly. (I have been learning php/mysql for about 8 days total and think I am getting it pretty good.)
Anyhow, I am trying to create a Edit-User.php page but when I edit the fields it is not updating in the database. I have looked everywhere and it seems all my code is correct but I cannot get it to work.
Any help would be greatly appreciated.
PHP
<?php
ob_start();
// contact to database
include_once('../mysql_connect.php');
$insert_data = mysql_real_escape_string($input_data);
$id=$_POST['EditID'];
$fname=$_POST['fname'];
$lname=$_POST['lname'];
$email=$_POST['email'];
$altemail=$_POST['altemail'];
$notes=$_POST['notes'];
$company=$_POST['company'];
$address=$_POST['address'];
$home=$_POST['home'];
$cell=$_POST['cell'];
$telephone=$_POST['telephone'];
$usertype=$_POST['usertype'];
$assigned=$_POST['assigned'];
$othercat=$_POST['othercat'];
$interested=$_POST['interested'];
$redirect = "users.php?Msg=Update";
$query = "UPDATE `users` SET `fname`='$fname',`lname`='$lname',`email`='$email',`altemail`='$altemail',`notes`='$notes',`company`='$company',`address`='$address',`home`='$home',`cell`='$cell',`telephone`='$telephone',`usertype`='$usertype',`assigned`='$assigned',`othercat`='$othercat',`interested`='$interested'" . $UF . "WHERE `id`='$id' LIMIT 1;";
echo $query;
mysql_query($query) or die(mysql_error() . "<br />" . $query);
// Redirect
header("Location: " . $redirect);
ob_flush();
?>