corkg Posted August 26, 2007 Share Posted August 26, 2007 I have some code so when you type a number in it saves it but if you want to put the value back to 0 it will not work, Thanks Quote Link to comment Share on other sites More sharing options...
pocobueno1388 Posted August 26, 2007 Share Posted August 26, 2007 We can't really help you unless you show us the code... Quote Link to comment Share on other sites More sharing options...
corkg Posted August 26, 2007 Author Share Posted August 26, 2007 $ds_amount=intval(strip_tags($_POST['ds'])); elseif ($new_explosives7 <= 5){ $ds = $ds_amount; $ds = "$explosives[0]-$explosives[1]-$explosives[2]-$explosives[3]-$explosives[4]-$explosives[5]-$ds-$explosives[7]"; mysql_query("UPDATE oc SET explosives='$ds' WHERE id='$oc->id'"); Quote Link to comment Share on other sites More sharing options...
corkg Posted August 27, 2007 Author Share Posted August 27, 2007 Is it thinking 0 is NULL Quote Link to comment Share on other sites More sharing options...
Jessica Posted August 27, 2007 Share Posted August 27, 2007 $ds = "$explosives[0]-$explosives[1]-$explosives[2]-$explosives[3]-$explosives[4]-$explosives[5]-$ds-$explosives[7]"; That will make a string which will be something like 0-2-4-5-35-34 etc based on whatever numbers those are. Take out the quotes and it will be an integer. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.