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();
}
?>
PHP

Avatar of undefined
Last Comment
terrydschmidt

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
amit_g

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
terrydschmidt

ASKER
Thanks for answering so quickly!  I needed it to work really quick.  Thanks again!!!!!!!
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck