4
another question, but not on dropping tables,
updating them this time....
i currently have this code:
//Meta Redirect
echo "";
echo "";
echo "";
//Get XOOPS Stuff
include "../../../include/cp_header.php";
xoops_cp_header();
//Retrieve Data from Form
$cid = $_POST['cid'];
$pic = $_POST['pic'];
//Set MySQL Table
$table = $xoopsDB->prefix( "bf2stats" ) ;
//Update Table
if (isset($cid)) {
$xoopsDB->query("UPDATE `$table` SET `cid` = '$cid', `pic` = '$pic' WHERE `wid` = '1' LIMIT 1");
}
if (empty($cid)) {
$cid = "Value Empty!";
$emp = "1";
}
if (empty($pic)) {
$pic = "Value Empty!";
$emp = "1";
}
OpenTable();
?>
Battlefield 2 Stats Supplied By bf2tracker.com
You will be redirected back to the main page in 5 seconds.
echo "$pic" ;
echo "$cid" ;
?>
if ($emp === '1') { echo "Database Was Not Updated because one or more
variables are missing."; }
if (empty($emp)) { echo "Database Was successfully updated."; }
?>
BF2 Tracker Clan ID
|
echo $cid ?> |
Display Pictures on Side |
echo $pic ?> |
|
|
CloseTable();
xoops_cp_footer();
?>
Now i know the data gets to it from the other form, and it all works, except it doesn't update the database.
Any Ideas?