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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.