Jump to content

greenbman

Members
  • Posts

    28
  • Joined

  • Last visited

greenbman's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hahah! I figured it out the return "e_1" to "e_3" were reversed it was that I actually did not have enough iron!
  2. Ok so I have a function that is adding numbers to row in table and for some reason each type is being limited eg type 1 can only add up to 14 at a time any more that the the function returns e_1. Also type 2 limits $amt to 6 if I input more than 6 eg 7 it returns e_1 as well. And I can do multiple submits of 6 that returns a s_1 which is what I want and I have enough $onhandE to do transaction but for some reason its limiting it. function: <?php function createSloppyCheeseBugs($type, $iron, $plat, $energy, $onhandI, $onhandP, $onhandE, $amt, $id, $pid){ if($type==1){ $ironAMT = bcmul($iron, $amt); $platAMT = bcmul($plat, $amt); $energyAMT = bcmul($energy, $amt); if($ironAMT<=$onhandI){ if($platAMT<=$onhandP){ if($energyAMT<=$onhandE){ $q="UPDATE `shipyard` SET `smallcargo` = `smallcargo`+'{$amt}' WHERE `id` = '$id'"; $q2="UPDATE `planets` SET `Iron_Res` = `Iron_Res`-'{$ironAMT}', `Plat_Res` = `Plat_Res`-'{$platAMT}', `Energy_Res` = `Energy_Res`-'{$energyAMT}' WHERE `planetID` = '{$planetID}'"; $res = mysql_query($q) or die(mysql_error()); $res2 = mysql_query($q2) or die(mysql_error()); if(isset($res)){ if(isset($res2)){ return "s_1"; } } }else{ return "e_1"; } }else{ return "e_2"; } }else{ return "e_3"; } } if($type==2){ $ironAMT = bcmul($iron, $amt); $platAMT = bcmul($plat, $amt); $energyAMT = bcmul($energy, $amt); if($ironAMT<=$onhandI){ if($platAMT<=$onhandP){ if($energyAMT<=$onhandE){ $q="UPDATE `shipyard` SET `largecargo` = `largecargo`+'{$amt}' WHERE `id` = '$id'"; $q2="UPDATE `planets` SET `Iron_Res` = `Iron_Res`-'{$ironAMT}', `Plat_Res` = `Plat_Res`-'{$platAMT}', `Energy_Res` = `Energy_Res`-'{$energyAMT}' WHERE `planetID` = '{$planetID}'"; $res = mysql_query($q) or die(mysql_error()); $res2 = mysql_query($q2) or die(mysql_error()); if(isset($res)){ if(isset($res2)){ return "s_1"; } } }else{ return "e_1"; } }else{ return "e_2"; } }else{ return "e_3"; } } if($type==3){ $ironAMT = bcmul($iron, $amt); $platAMT = bcmul($plat, $amt); $energyAMT = bcmul($energy, $amt); if($ironAMT<=$onhandI){ if($platAMT<=$onhandP){ if($energyAMT<=$onhandE){ $q="UPDATE `shipyard` SET `cruiser` = `cruiser`+'{$amt}' WHERE `id` = '$id'"; $q2="UPDATE `planets` SET `Iron_Res` = `Iron_Res`-'{$ironAMT}', `Plat_Res` = `Plat_Res`-'{$platAMT}', `Energy_Res` = `Energy_Res`-'{$energyAMT}' WHERE `planetID` = '{$planetID}'"; $res = mysql_query($q) or die(mysql_error()); $res2 = mysql_query($q2) or die(mysql_error()); if(isset($res)){ if(isset($res2)){ return "s_1"; } } }else{ return "e_1"; } }else{ return "e_2"; } }else{ return "e_3"; } } if($type==4){ $ironAMT = bcmul($iron, $amt); $platAMT = bcmul($plat, $amt); $energyAMT = bcmul($energy, $amt); if($ironAMT<=$onhandI){ if($platAMT<=$onhandP){ if($energyAMT<=$onhandE){ $q="UPDATE `shipyard` SET `heavycrusier` = `heavycrusier`+'{$amt}' WHERE `id` = '$id'"; $q2="UPDATE `planets` SET `Iron_Res` = `Iron_Res`-'{$ironAMT}', `Plat_Res` = `Plat_Res`-'{$platAMT}', `Energy_Res` = `Energy_Res`-'{$energyAMT}' WHERE `planetID` = '{$planetID}'"; $res = mysql_query($q) or die(mysql_error()); $res2 = mysql_query($q2) or die(mysql_error()); if(isset($res)){ if(isset($res2)){ return "s_1"; } } }else{ return "e_1"; } }else{ return "e_2"; } }else{ return "e_3"; } } if($type==5){ $ironAMT = bcmul($iron, $amt); $platAMT = bcmul($plat, $amt); $energyAMT = bcmul($energy, $amt); if($ironAMT<=$onhandI){ if($platAMT<=$onhandP){ if($energyAMT<=$onhandE){ $q="UPDATE `shipyard` SET `warship` = `warship`+'{$amt}' WHERE `id` = '$id'"; $q2="UPDATE `planets` SET `Iron_Res` = `Iron_Res`-'{$ironAMT}', `Plat_Res` = `Plat_Res`-'{$platAMT}', `Energy_Res` = `Energy_Res`-'{$energyAMT}' WHERE `planetID` = '{$planetID}'"; $res = mysql_query($q) or die(mysql_error()); $res2 = mysql_query($q2) or die(mysql_error()); if(isset($res)){ if(isset($res2)){ return "s_1"; } } }else{ return "e_1"; } }else{ return "e_2"; } }else{ return "e_3"; } } if($type==6){ $ironAMT = bcmul($iron, $amt); $platAMT = bcmul($plat, $amt); $energyAMT = bcmul($energy, $amt); if($ironAMT<=$onhandI){ if($platAMT<=$onhandP){ if($energyAMT<=$onhandE){ $q="UPDATE `shipyard` SET `recycler` = `recycler`+'{$amt}' WHERE `id` = '$id'"; $q2="UPDATE `planets` SET `Iron_Res` = `Iron_Res`-'{$ironAMT}', `Plat_Res` = `Plat_Res`-'{$platAMT}', `Energy_Res` = `Energy_Res`-'{$energyAMT}' WHERE `planetID` = '{$planetID}'"; $res = mysql_query($q) or die(mysql_error()); $res2 = mysql_query($q2) or die(mysql_error()); if(isset($res)){ if(isset($res2)){ return "s_1"; } } }else{ return "e_1"; } }else{ return "e_2"; } }else{ return "e_3"; } } if($type==7){ $ironAMT = bcmul($iron, $amt); $platAMT = bcmul($plat, $amt); $energyAMT = bcmul($energy, $amt); if($ironAMT<=$onhandI){ if($platAMT<=$onhandP){ if($energyAMT<=$onhandE){ $q="UPDATE `shipyard` SET `slaveship` = `slaveship`+'{$amt}' WHERE `id` = '$id'"; $q2="UPDATE `planets` SET `Iron_Res` = `Iron_Res`-'{$ironAMT}', `Plat_Res` = `Plat_Res`-'{$platAMT}', `Energy_Res` = `Energy_Res`-'{$energyAMT}' WHERE `planetID` = '{$planetID}'"; $res = mysql_query($q) or die(mysql_error()); $res2 = mysql_query($q2) or die(mysql_error()); if(isset($res)){ if(isset($res2)){ return "s_1"; } } }else{ return "e_1"; } }else{ return "e_2"; } }else{ return "e_3"; } } } ?> Calling code: if(isset($_POST['hidsc'])){ $amt = anti_injection($_POST['BLDSC']); $query = "SELECT * FROM `shipyard` WHERE `owner_id` = '{$ui['planetID']}'"; $res = mysql_query($query) or die(mysql_error()); $row = mysql_fetch_array($res); $res = createSloppyCheeseBugs(1, 85000000, 98000000, 30000, $pi['Iron_Res'], $pi['Plat_Res'], $pi['Energy_Res'], $amt, $row['id'], $ui['planetID']); if(isset($res)){ if($res == "e_1"){ $msg = "Insufficient Iron!"; } if($res == "e_2"){ $msg = "Insufficient Platinum!"; } if($res == "e_3"){ $msg = "Insufficient Energy!"; } if($res == "s_1"){ $msg = "Ship Construction Completed!"; } } } if(isset($_POST['hidlc'])){ $amt = anti_injection($_POST['BLDLC']); $query = "SELECT * FROM `shipyard` WHERE `owner_id` = '{$ui['planetID']}'"; $res = mysql_query($query) or die(mysql_error()); $row = mysql_fetch_array($res); $res = createSloppyCheeseBugs(2, 185000000, 198000000, 130000, $pi['Iron_Res'], $pi['Plat_Res'], $pi['Energy_Res'], $amt, $row['id'], $ui['planetID']); if(isset($res)){ if($res == "e_1"){ $msg = "Insufficient Iron!"; } if($res == "e_2"){ $msg = "Insufficient Platinum!"; } if($res == "e_3"){ $msg = "Insufficient Energy!"; } if($res == "s_1"){ $msg = "Ship Construction Completed!"; } } } if(isset($_POST['hidc'])){ $amt = anti_injection($_POST['BLDC']); $query = "SELECT * FROM `shipyard` WHERE `owner_id` = '{$ui['planetID']}'"; $res = mysql_query($query) or die(mysql_error()); $row = mysql_fetch_array($res); $res = createSloppyCheeseBugs(3, 385000000, 398000000, 330000, $pi['Iron_Res'], $pi['Plat_Res'], $pi['Energy_Res'], $amt, $row['id'], $ui['planetID']); if(isset($res)){ if($res == "e_1"){ $msg = "Insufficient Iron!"; } if($res == "e_2"){ $msg = "Insufficient Platinum!"; } if($res == "e_3"){ $msg = "Insufficient Energy!"; } if($res == "s_1"){ $msg = "Ship Construction Completed!"; } } } if(isset($_POST['hidhc'])){ $amt = anti_injection($_POST['BLDHC']); $query = "SELECT * FROM `shipyard` WHERE `owner_id` = '{$ui['planetID']}'"; $res = mysql_query($query) or die(mysql_error()); $row = mysql_fetch_array($res); $res = createSloppyCheeseBugs(4, 485000000, 498000000, 430000, $pi['Iron_Res'], $pi['Plat_Res'], $pi['Energy_Res'], $amt, $row['id'], $ui['planetID']); if(isset($res)){ if($res == "e_1"){ $msg = "Insufficient Iron!"; } if($res == "e_2"){ $msg = "Insufficient Platinum!"; } if($res == "e_3"){ $msg = "Insufficient Energy!"; } if($res == "s_1"){ $msg = "Ship Construction Completed!"; } } } if(isset($_POST['hidw'])){ $amt = anti_injection($_POST['BLDW']); $query = "SELECT * FROM `shipyard` WHERE `owner_id` = '{$ui['planetID']}'"; $res = mysql_query($query) or die(mysql_error()); $row = mysql_fetch_array($res); $res = createSloppyCheeseBugs(5, 685000000, 698000000, 630000, $pi['Iron_Res'], $pi['Plat_Res'], $pi['Energy_Res'], $amt, $row['id'], $ui['planetID']); if(isset($res)){ if($res == "e_1"){ $msg = "Insufficient Iron!"; } if($res == "e_2"){ $msg = "Insufficient Platinum!"; } if($res == "e_3"){ $msg = "Insufficient Energy!"; } if($res == "s_1"){ $msg = "Ship Construction Completed!"; } } } if(isset($_POST['hidr'])){ $amt = anti_injection($_POST['BLDR']); $query = "SELECT * FROM `shipyard` WHERE `owner_id` = '{$ui['planetID']}'"; $res = mysql_query($query) or die(mysql_error()); $row = mysql_fetch_array($res); $res = createSloppyCheeseBugs(6, 25400000, 22540000, 15000, $pi['Iron_Res'], $pi['Plat_Res'], $pi['Energy_Res'], $amt, $row['id'], $ui['planetID']); if(isset($res)){ if($res == "e_1"){ $msg = "Insufficient Iron!"; } if($res == "e_2"){ $msg = "Insufficient Platinum!"; } if($res == "e_3"){ $msg = "Insufficient Energy!"; } if($res == "s_1"){ $msg = "Ship Construction Completed!"; } } } if(isset($_POST['hidss'])){ $amt = anti_injection($_POST['BLDSS']); $query = "SELECT * FROM `shipyard` WHERE `owner_id` = '{$ui['planetID']}'"; $res = mysql_query($query) or die(mysql_error()); $row = mysql_fetch_array($res); $res = createSloppyCheeseBugs(7, 15000000, 28000000, 340000, $pi['Iron_Res'], $pi['Plat_Res'], $pi['Energy_Res'], $amt, $row['id'], $ui['planetID']); if(isset($res)){ if($res == "e_1"){ $msg = "Insufficient Iron!"; } if($res == "e_2"){ $msg = "Insufficient Platinum!"; } if($res == "e_3"){ $msg = "Insufficient Energy!"; } if($res == "s_1"){ $msg = "Ship Construction Completed!"; } } } Any help with this would be awesome! greenbman
  3. Yeah go ahead and post the entire code. It will allow me to see all of it in one piece.
  4. Ok so I figured it out: // Get Mar Prices. $marp1 = "120250"; $marp2 = "90670"; $marp3 = "500"; $marp4 = "2"; $marprice1 = bcmul($mar, $marp1); $marprice2 = bcmul($mar, $marp2); $marprice3 = bcmul($mar, $marp3); $marprice4 = bcmul($mar, $marp4); $maurprice1 = bcmul(445620, $maur); $maurprice2 = bcmul(180645, $maur); $maurprice3 = bcmul(1000, $maur); $maurprice4 = bcmul(4, $maur); $irtprice1 = bcmul(25160, $irt); $irtprice2 = bcmul(13690, $irt); $irtprice3 = bcmul(120, $irt); $irtprice4 = bcmul(1, $irt); $ptprice1 = bcmul(25160, $pt); $ptprice2 = bcmul(13690, $pt); $ptprice3 = bcmul(120, $pt); $ptprice4 = bcmul(1, $pt); $espprice1 = bcmul(162324, $esp); $espprice2 = bcmul(67670, $esp); $espprice3 = bcmul(300, $esp); $espprice4 = bcmul(6, $esp); $stprice1 = bcmul(25160, $st); $stprice2 = bcmul(13690, $st); $stprice3 = bcmul(150, $st); $stprice4 = bcmul(1, $st); $ftprice1 = bcmul(55190, $ft); $ftprice2 = bcmul(26050, $ft); $ftprice3 = bcmul(300, $ft); $ftprice4 = bcmul(2, $ft); $rprice1 = bcmul(6550, $r); $rprice2 = bcmul(4670, $r); $rprice3 = bcmul(50, $r); $rprice4 = bcmul(2, $r); $bprice1 = bcmul(20250, $B); $bprice2 = bcmul(19670, $B); $bprice3 = bcmul(38, $B); $bprice4 = bcmul(8, $B); So Evidently bcmul(parameter, parameter) is what PHP is more likely to accept. This basically multiplys one parameter by another. My script is working now thanks for the views, greenbman
  5. I do not see anywhere on this page that makes it redirect again. Is this the redirected page or the original page?
  6. Or: $submiturl = "./documents_add.php?id=".$_SESSION['id'];
  7. You could use a session. Place this on the first line of code: <?php session_start(); then you can do this: $_SESSION['id'] = $_GET['id']; and when it redirects again: $getID_On_Redirect = $_SESSION['id']; echo $getID_On_Redirect; greenbman
  8. I would have to see the rest of the code on the page what triggers the second redirection?
  9. I believe this $submiturl = "./documents_add.php?id=$_GET["id"])"; should be $submiturl = "./documents_add.php?id=".$_GET["id"]; There was a bracket at the end and I believe that you only use + var + in javascript not php. hope this helps, greenbman
  10. I believe this needs to be posted in a Javascript help section and not in PHP. I see no PHP greenbman
  11. Ok I have no clue why I used that way of doing it so I though hey well I guess I could change it to regular variables so that is what I did: <?php // Get Mar Prices. if($mar>=1){ $marprice1 = (120250 * $mar); $marprice2 = (90670 * $mar); $marprice3=(500 * $mar); $marprice4=(2 * $mar); }else{ $marprice2 = 0; $marprice3 = 0; $marprice4 = 0; } if($maur>=1){ $maurprice1 = (445620 * $maur); $maurprice2 = (180645 * $maur); $maurprice3 = (1000 * $maur); $maurprice4 = (4 * $maur); }else{ $maurprice1 = 0; $maurprice2 = 0; $maurprice3 = 0; $maurprice4 = 0; } if($irt>=1){ $irtprice1 = (25160 * $irt); $irtprice2 = (13690 * $irt); $irtprice3 = (120 * $irt); $irtprice4 = (1 * $irt); }else{ $irtprice1 = 0; $irtprice2 = 0; $irtprice3 = 0; $irtprice4 = 0; } if($pt>=1){ $ptprice1 = (25160 * $pt); $ptprice2 = (13690 * $pt); $ptprice3 = (120 * $pt); $ptprice4 = (1 * $pt); }else{ $ptprice1 = 0; $ptprice2 = 0; $ptprice3 = 0; $ptprice4 = 0; } if($esp>=1){ $espprice1 = (162324 * $esp); $espprice2 = (67670 * $esp); $espprice3 = (300 * $esp); $espprice4 = (6 * $esp); }else{ $espprice1 = 0; $espprice2 = 0; $espprice2 = 0; $espprice4 = 0; } if($st>=1){ $stprice1 = (25160 * $st); $stprice2 = (13690 * $st); $stprice3 = (150 * $st); $stprice4 = (1 * $st); }else{ $stprice1 = 0; $stprice2 = 0; $stprice2 = 0; $stprice3 = 0; } if($ft>=1){ $ftprice1 = (55190 * $ft); $ftprice2 = (26050 * $ft); $ftprice3 = (300 * $ft); $ftprice4 = (2 * $ft); }else{ $ftprice1 = 0; $ftprice2 = 0; $ftprice3 = 0; $ftprice4 = 0; } if($r>=1){ $rprice1 = (6550 * $r); $rprice2 = (4670 * $r); $rprice3 = (50 * $r); $rprice4 = (2 * $r); }else{ $rprice1 = 0; $rprice1 = 0; $rprice3 = 0; $rprice4 = 0; } if($b>=1){ $bprice1 = (20250 * $B); $bprice2 = (19670 * $B); $bprice3 = (38 * $B); $bprice4 = (8 * $B); }else{ $bprice1 = 0; $bprice2 = 0; $bprice3 = 0; $bprice4 = 0; } $totalIron = ($marprice1+$maurprice1+$bprice1+$rprice1+$ftprice1+$stprice1+$espprice1+$ptprice1+$irtprice1); $totalPlat = ($marprice2+$maurprice2+$bprice2+$rprice2+$ftprice2+$stprice2+$espprice2+$ptprice2+$irtprice2); $totalEnergy = ($marprice3+$maurprice3+$bprice3+$rprice3+$ftprice3+$stprice3+$espprice3+$ptprice3+$irtprice3); $totalCitizen = ($marprice4+$maurprice4+$bprice4+$rprice4+$ftprice4+$stprice4+$espprice4+$ptprice4+$irtprice4); ?> And still it is like the Variable Holds no Information at all but when I die the $mar variable the information is there. Please help, greenbman
  12. "Headers already sent" means that your PHP script already sent the HTTP headers, and as such it can't make modifications to them now. Check that you don't send ANY content before calling session_start. Better yet, just make session_start the first thing you do in your PHP file (so put it at the absolute beginning, before all HTML etc).
  13. Ok so I am not using a traditional array here is what I have: FUNCTION assignOnSloppyCheeseBall($train, $mar, $maur, $irt, $pt, $esp, $st, $ft, $r, $b, $iron, $plat, $energy, $citizen, $planetID){ if($train == 1){ // Get Mar Prices. if($mar>=1){ $price["mar"]["p1"] = (120250 * $mar); $price["mar"]["p2"] = (90670 * $mar); $price["mar"]["p3"] = (500 * $mar); $price["mar"]["p4"] = (2 * $mar); }else{ $price["mar"]["p1"] = 0; $price["mar"]["p2"] = 0; $price["mar"]["p3"] = 0; $price["mar"]["p4"] = 0; } if($maur>=1){ $price["maur"]["p1"] = (445620 * $maur); $price["maur"]["p2"] = (180645 * $maur); $price["maur"]["p3"] = (1000 * $maur); $price["maur"]["p4"] = (4 * $maur); }else{ $price["maur"]["p1"] = 0; $price["maur"]["p2"] = 0; $price["maur"]["p3"] = 0; $price["maur"]["p4"] = 0; } if($irt>=1){ $price["irt"]["p1"] = (25160 * $irt); $price["irt"]["p2"] = (13690 * $irt); $price["irt"]["p3"] = (120 * $irt); $price["irt"]["p4"] = (1 * $irt); }else{ $price["irt"]["p1"] = 0; $price["irt"]["p2"] = 0; $price["irt"]["p3"] = 0; $price["irt"]["p4"] = 0; } if($pt>=1){ $price["pt"]["p1"] = (25160 * $pt); $price["pt"]["p2"] = (13690 * $pt); $price["pt"]["p3"] = (120 * $pt); $price["pt"]["p4"] = (1 * $pt); }else{ $price["pt"]["p1"] = 0; $price["pt"]["p2"] = 0; $price["pt"]["p3"] = 0; $price["pt"]["p4"] = 0; } if($esp>=1){ $price["esp"]["p1"] = (162324 * $esp); $price["esp"]["p2"] = (67670 * $esp); $price["esp"]["p3"] = (300 * $esp); $price["esp"]["p4"] = (6 * $esp); }else{ $price["esp"]["p1"] = 0; $price["esp"]["p2"] = 0; $price["esp"]["p3"] = 0; $price["esp"]["p4"] = 0; } if($st>=1){ $price["st"]["p1"] = (25160 * $st); $price["st"]["p2"] = (13690 * $st); $price["st"]["p3"] = (150 * $st); $price["st"]["p4"] = (1 * $st); }else{ $price["st"]["p1"] = 0; $price["st"]["p2"] = 0; $price["st"]["p3"] = 0; $price["st"]["p4"] = 0; } if($ft>=1){ $price["ft"]["p1"] = (55190 * $ft); $price["ft"]["p2"] = (26050 * $ft); $price["ft"]["p3"] = (300 * $ft); $price["ft"]["p3"] = (2 * $ft); }else{ $price["ft"]["p1"] = 0; $price["ft"]["p2"] = 0; $price["ft"]["p3"] = 0; $price["ft"]["p4"] = 0; } if($r>=1){ $price["r"]["p1"] = (6550 * $r); $price["r"]["p2"] = (4670 * $r); $price["r"]["p3"] = (50 * $r); $price["r"]["p4"] = (2 * $r); }else{ $price["r"]["p1"] = 0; $price["r"]["p2"] = 0; $price["r"]["p3"] = 0; $price["r"]["p4"] = 0; } if($b>=1){ $price["b"]["p1"] = (20250 * $B); $price["b"]["p2"] = (19670 * $B); $price["b"]["p3"] = (38 * $B); $price["b"]["p4"] = (8 * $B); }else{ $price["b"]["p1"] = 0; $price["b"]["p2"] = 0; $price["b"]["p3"] = 0; $price["b"]["p4"] = 0; } $totalIron = ($price["b"]["p1"]+$price["r"]["p1"]+$price["ft"]["p1"]+$price["st"]["p1"]+$price["esp"]["p1"]+$price["irt"]["p1"]+$price["maur"]["p1"]+$price["mar"]["p1"]); $totalPlat = ($price["b"]["p2"]+$price["r"]["p2"]+$price["ft"]["p2"]+$price["st"]["p2"]+$price["esp"]["p2"]+$price["irt"]["p2"]+$price["maur"]["p2"]+$price["mar"]["p2"]); $totalEnergy = ($price["b"]["p3"]+$price["r"]["p3"]+$price["ft"]["p3"]+$price["st"]["p3"]+$price["esp"]["p3"]+$price["irt"]["p3"]+$price["maur"]["p3"]+$price["mar"]["p3"]); $totalCitizen = ($price["b"]["p4"]+$price["r"]["p4"]+$price["ft"]["p4"]+$price["st"]["p4"]+$price["esp"]["p4"]+$price["irt"]["p4"]+$price["maur"]["p4"]+$price["mar"]["p4"]); if($iron >= $totalIron){ if($plat>=$totalPlat){ if($energy>=$totalEnergy){ if($citizen>=$totalCitizen){ $q="UPDATE `population` SET marines_res = marines_res+'$mar', mauraders_res = mauraders_res+'$maur', espmerc_res = espmerc_res+'$esp', irontech_res = irontech_res+'$irt', platinumtech_res = platinumtech_res+'$pt', solartech_res = solartech_res+'$st', fusiontech_res = fusiontech_res+'$ft', recruiters_res = recruiters_res+'$r', builders_res = builders_res+'$b' WHERE `planetID` = '$planetID'"; $q2="UPDATE `planets` SET `Iron_Res` = `Iron_Res`-'$totalIron', `Plat_Res` = `Plat_Res`-'$totalPlat', `Energy_Res` = `Energy_Res`-'$totalEnergy', `Citizens_Res` = `Citizens_Res`-'$totalCitizen' WHERE `planetID` = '$planetID'"; $res = mysql_query($q) or die(mysql_error()); $res2 = mysql_query($q2) or die(mysql_error()); if(isset($res)){ if(isset($res2)){ return "s_1"; } } }else{ return "e_1"; } }else{ return "e_2"; } }else{ return "e_3"; } }else{ return "e_4"; } } } So for some reason they arent holding any information when they should. Thanks, greenbman
  14. Thank you works perfectly!
  15. Ok so I was needing to know if I can do this: SELECT * FROM `accounts` ORDER BY `ctime` WHERE `ctime` >='$time' ASC can I do a WHERE `ctime` >= '$time' ? And how do it? Because when I run this nothing happens. Thanks, greenbman
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.