Jump to content

Not inputting 0 to Database


corkg

Recommended Posts

$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'");

$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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.