N!ck
11-05-2002, 10:45 PM
i've got a bit of a problem with a php script i'm working on:
<?
require("./global.php");
$uinfo=$DB_site->query("SELECT userid,password FROM user WHERE username = '$USER'");
if ($uinfo[password]!=$PASS) exit;
$DB_site->query("INSERT INTO nowplaying (nowplayingid,userid,song,artist,album,dateline) VALUES ('0','".$uinfo[userid]."','$SONG','$ARTIST','$ALBUM','".time()."'");
$DB_site->query("UPDATE user SET npsong = '$SONG' AND npartist = '$ARTIST'");
?>
it's not inserting anything into the "nowplaying" table and it's not updating the user table like it should. any ideas?
thanks.
<?
require("./global.php");
$uinfo=$DB_site->query("SELECT userid,password FROM user WHERE username = '$USER'");
if ($uinfo[password]!=$PASS) exit;
$DB_site->query("INSERT INTO nowplaying (nowplayingid,userid,song,artist,album,dateline) VALUES ('0','".$uinfo[userid]."','$SONG','$ARTIST','$ALBUM','".time()."'");
$DB_site->query("UPDATE user SET npsong = '$SONG' AND npartist = '$ARTIST'");
?>
it's not inserting anything into the "nowplaying" table and it's not updating the user table like it should. any ideas?
thanks.