Link to home
Start Free TrialLog in
Avatar of terrydschmidt
terrydschmidt

asked on

ASAP is MySQL UPDATE need correct syntax

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
Avatar of amit_g
amit_g
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of terrydschmidt
terrydschmidt

ASKER

Thanks for answering so quickly!  I needed it to work really quick.  Thanks again!!!!!!!