Hello
Is there a way to make so that when a user does not enter anything in any box, then that box will not get updated and stay the same? My only problem is currently just getting the data to update without having the user to enter them all the time.
example: you are the user, you login and you submit your data for the first time (fine). You then want to update the data, so you log back in and you see nothing in the boxes, ok, dont panic your stuff was saved in the database. You want to update one size as you may have put on a few pounds and so you only enter the size in that box and you click submit which updates it in the database (ok), BUT the rest of the data you entered before are now all zero. So can i make it so the user can just enter data in one fielld and not have to worry about the rest.
thanks
my php update code is:
<?
###This script is used to update the position of each Object in the database. It combines the x and y position into one column in the database.
###This connects to your database.
mysql_connect("hmm","hmm","hmm") or die();
mysql_select_db("hmm") or die();
#This is just a simple way to take out unwanted characters.
$Neck = ereg_replace("[^A-Za-z0-9 ]", "", $Neck);
$Chest = ereg_replace("[^A-Za-z0-9 ]", "", $Chest);
$Bust = ereg_replace("[^A-Za-z0-9 ]", "", $Bust);
$Hips = ereg_replace("[^A-Za-z0-9 ]", "", $Hips);
$Crotch = ereg_replace("[^A-Za-z0-9 ]", "", $Crotch);
$Waisttohip = ereg_replace("[^A-Za-z0-9 ]", "", $Waisttohip);
$Wasittoknee = ereg_replace("[^A-Za-z0-9 ]", "", $Waisttoknee);
$Waisttofloor = ereg_replace("[^A-Za-z0-9 ]", "", $Waisttofloor);
$Centreback = ereg_replace("[^A-Za-z0-9 ]", "", $Centreback);
$Bodyrise = ereg_replace("[^A-Za-z0-9 ]", "", $Bodyrise);
$Backwidth = ereg_replace("[^A-Za-z0-9 ]", "", $Backwidth);
$Armholedepth = ereg_replace("[^A-Za-z0-9 ]", "", $Armholedepth);
$Armhole = ereg_replace("[^A-Za-z0-9 ]", "", $Armhole);
$Overarm = ereg_replace("[^A-Za-z0-9 ]", "", $Overarm);
$Biceps = ereg_replace("[^A-Za-z0-9 ]", "", $Biceps);
$Wrist = ereg_replace("[^A-Za-z0-9 ]", "", $Wrist);
$Highankle = ereg_replace("[^A-Za-z0-9 ]", "", $Highankle);
$Ankle = ereg_replace("[^A-Za-z0-9 ]", "", $Ankle);
#This line converts name to uppercase so the login is not case sensitive.
$username = strtoupper ($username);
###This is the SQL statement that will update the settings in the Database.
$query = "UPDATE sizes SET size='$Size', waist='$Waist', length='$Length', Neck='$Neck', Chest='$Chest', Bust='$Bust', Hips='$Hips', Crotch='$Crotch', Waisttohip='$Waisttohip', Waisttoknee='$Waisttoknee', Waisttofloor='$Waisttofloor', Centreback='$Centreback', Bodyrise='$Bodyrise', Backwidth='$Backwidth', Armholedepth='$Armholedepth', Armhole='$Armhole', Overarm='$Overarm', Biceps='$Biceps', Wrist='$Wrist', Highankle='$Highankle', Ankle='$Ankle' WHERE username='$username'";
$result = mysql_query($query);
#This prints out the success command to a text field in the movie if it's successful.
print "_root.UpdateStatus=Success Updated - It's saved $username";
?>