close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

update check box

Thread began 3/28/2014 9:56 pm by Joanne | Last modified 4/04/2014 8:27 am by Joanne | 727 views | 4 replies


update check box

Hi, I am having trouble in updating the checkboxs in dreamweaver. Currently, when I try to insert the data, everything seem like working well for me but when I try to update the data, the checkboxs only an show an empty box. How can I retrieve the data so that whatever i have check previously appears on the checkbox? Can anyone help me? I will really appreciate it. Thank you.

$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);

if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1")) {
// convert the checkbox group subarray to a string
if (isset($_POST['requirement'])) {
$_POST['requirement'] = implode(',', $_POST['requirement']);
} else {
$_POST['requirement'] = 'none';

$updateSQL = sprintf("UPDATE requirement SET event=%s, requirement=%s, facilities=%s, other=%s WHERE matrix=%s",
GetSQLValueString($_POST['event'], "text"),
GetSQLValueString($_POST['requirement'], "text"),
GetSQLValueString($_POST['facilities'], "text"),
GetSQLValueString($_POST['other'], "text"),
GetSQLValueString($_POST['matrix'], "text"));

mysql_select_db($database_localhost, $localhost);
$Result1 = mysql_query($updateSQL, $localhost) or die(mysql_error());

<tr valign="baseline">

<td nowrap="nowrap" align="right">Requirement:</td>
<td><input type="checkbox" name="requirement[]" value="Plug" id="requirement_0"<?php echo((in_array("Plug", explode(", ", $row_get_other['requirement'])))?"checked=checked":""); ?>/>
<tr valign="baseline">
<td nowrap="nowrap" align="right">&nbsp;</td>
<td><input type="checkbox" name="requirement[]" value="Pen" id="requirement_1"<?php echo((in_array("Pen", explode(", ", $row_get_other['requirement'])))?"checked=checked":""); ?>/>
<tr valign="baseline">
<td nowrap="nowrap" align="right">&nbsp;</td>
<td><input type="checkbox" name="requirement[]" value="Goodies" id="requirement_2"<?php echo((in_array("Goodies", explode(", ", $row_get_other['requirement'])))?"checked=checked":""); ?>/>

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...