PDA

View Full Version : [non-vb]: This doesn't quite work...


Davey
08-20-2003, 07:47 PM
if (($_REQUEST['u'] === md5($login['user'])) and ($_REQUEST['p'] === md5($login['pass']))) {
$dbid = array_flip($_POST['dbid']);
if (is_array($dbid)) {
$string = implode(',', $dbid);
mysql_query("UPDATE `" . $cfg['tablename'] . "` SET viewable='1' WHERE `id` IN (" . $string . ")",$dbase);
}
It only updates one checkbox at a time... Why?

Davey
08-25-2003, 02:04 AM
Bump^? I'm kinda needing this..

SmEdD
08-26-2003, 05:41 PM
if (($_REQUEST['u'] === md5($login['user'])) and ($_REQUEST['p'] === md5($login['pass']))) {
$dbid = array_flip($_POST['dbid']);
if (is_array($dbid)) {
$string .= implode(',', $dbid);
mysql_query("UPDATE `" . $cfg['tablename'] . "` SET viewable='1' WHERE `id` IN (" . $string . ")",$dbase);
}

Try that

Davey
09-02-2003, 05:32 PM
Nope it still only allows one.
if (($_REQUEST['u'] === md5($login['user'])) and ($_REQUEST['p'] === md5($login['pass']))) {
$dbid = array_flip($_POST['dbid']);
if (is_array($dbid)) {
$string .= implode(',', $dbid);
mysql_query("UPDATE `" . $cfg['tablename'] . "` SET viewable='1' WHERE `id` IN (" . $string . ")",$dbase);
}