Jump to content

Check boxes with PHP


NathanS

Recommended Posts

Hi guys,

 

Tearing my hair out over this one! Currently returning a list from a database of customers, via an array. It displays without a problem - what I need to be able to do, is add a checkbox by each one, so someone can tick it and click submit, and it'll update the database for that record.

 

How would I go about linking it in with the ID so that this would be possible?

 

Any help on this would be greatly appreciated!

 

Thanks,

 

Nathan.

Link to comment
https://forums.phpfreaks.com/topic/94483-check-boxes-with-php/
Share on other sites

Still stuck on exactly how to achieve this: this is what I have now:

 

first page:

 

		echo "<TD WIDTH=70>";
	echo "<font color='#FF6633'>";
	echo "<INPUT TYPE='checkbox' ID='NEWID[]' VALUE='$id'>";
	echo "</TD>";
	echo "</font>";

 

update page:

 

$sql = "UPDATE customer_insured_party SET ACTIONEDYN  = '".$_POST["ACTIONEDYN"]."' WHERE cip_id = '".$_POST["NEWID"]."'";

 

Am i missing something major?

 

Thanks.

Link to comment
https://forums.phpfreaks.com/topic/94483-check-boxes-with-php/#findComment-483931
Share on other sites

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.