troubleshooting Question

ASAP is MySQL UPDATE need correct syntax

Avatar of terrydschmidt
terrydschmidt asked on
PHP
2 Comments1 Solution340 ViewsLast Modified:
Can someone help me quickly on the syntax of the mysql_query UPDATE and anything else I might of forgot.   I'm closing  the the database in the right spot, right??

<?php
session_start();

//Connect to Database
require 'db_connect.php';

echo "YOU ARE HERE!"."<br/>";
if (isset($_REQUEST['chkCheck_']) && is_array($_REQUEST['chkCheck_'])) {
     for($i=0;$i < sizeof($_REQUEST['chkCheck_']); $i++){
           $id = $_REQUEST['chkCheck_'][$i];
               echo $_REQUEST['chkCheck_'][$i];
                mysql_query("UPDATE discussion SET visible='Y' where id="$id" ");
       }
     mysql_close();
}
?>
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros