Jump to content

morbid angel911

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Everything posted by morbid angel911

  1. I tried your code and now it is saying Warning: Division by zero in /home/mintcity/public_html/v2/inc.cartel.buy.php on line 43 0] instead of online 44
  2. <? $cid = $myrow[cid]; ?> <form action="cartel.buyitems.submit.php?uid=<? echo $uid ?>&secid=<? echo $secid ?>" method="POST" enctype="application/x-www-form-urlencoded"> <table border="0" width="100%"> <tr> <td width="10%"><p align="CENTER"><b><font size="1" face="Verdana, Arial, Helvetica">QTY</font></b></td> <td width="15%"><b><font size="1" face="Verdana, Arial, Helvetica">ITEM</font></b></td> <td width="35%"><b><font size="1" face="Verdana, Arial, Helvetica">DESCRIPTION</font></b></td> <td width="15%"><b><font size="1" face="Verdana, Arial, Helvetica">PRICE</font></b></td> <td width="25%"><p align="RIGHT"><b><font size="1" face="Verdana, Arial, Helvetica">YOU HAVE</font></b></td> </tr> <? $sql2b = "SELECT money from og_cartelinfo where id=$cid"; @mysql_connect($dbhost, $dbuser, $dbpass); @mysql_select_db($dbname) or die("Error opening database"); $result2b = @mysql_query($sql2b); $myrow2b = @mysql_fetch_array($result2b); $sqlcs = "SELECT * from og_cartelrates where buy=1 order by id"; @mysql_connect($dbhost, $dbuser, $dbpass); @mysql_select_db($dbname) or die("Error opening database"); $resultcs = @mysql_query($sqlcs); $myrowcs = @mysql_fetch_array($resultcs); do { ?> <tr> <td width="10%"> <center> <p><input type="TEXT" name="item[<? echo $myrowcs[id] ?>]" size="4" style="Font-Family : Verdana, Arial, Helvetica ; Font-Size : 7pt"> </center> </td> <td width="15%"><b><font size="1" face="Verdana, Arial, Helvetica"><? echo $myrowcs[item_name] ?></font></b></td> <td width="35%"><b><font size="1" face="Verdana, Arial, Helvetica"><? echo $myrowcs[description] ?></font></b></td> <td width="15%"><b><font size="1" face="Verdana, Arial, Helvetica">$<? echo number_format($myrowcs[price]) ?> [<font size="1" face="Verdana, Arial, Helvetica" color="#FFC000"><u><? echo floor(($myrow2b[money] / $myrowcs[price])); ?></u></font>]</font></b></td> <? $product = $myrowcs[product]; $sql2 = "SELECT $product from og_cartelinfo where id=$cid"; @mysql_connect($dbhost, $dbuser, $dbpass); @mysql_select_db($dbname) or die("Error opening database"); $result2 = @mysql_query($sql2); $myrow2 = @mysql_fetch_array($result2); ?> <td width="25%"> <p align="RIGHT"><b><font size="1" face="Verdana, Arial, Helvetica"><? echo number_format($myrow2[$product]) ?></font></b> </td> </tr> <? } while ($myrowcs = @mysql_fetch_array($resultcs)); ?> <? if ($case) { ?> <tr> <td colspan="5"><br> <center><b><font size="2" face="Verdana, Arial, Helvetica">Whatcha doin foo? You ain't got enuff cash!</font></b></center> </td> </tr> <? } ?> <tr> <td colspan="5"><br> <br> <center><b><font size="1" face="Verdana, Arial, Helvetica">You have $<? echo number_format($myrow2b[money]) ?> to spend!</font></b></center><br><br> <input type="hidden" name="cid" value="<? echo $cid ?>"> <center><input type="submit" name="buy items" style="Font-Family : Verdana, Arial, Helvetica ; Font-Size : 7pt"></center> </td> </tr> </table> </form> This is the entire code. You don't think it would have something to do with my database do you?
  3. $0 [ Warning: Division by zero in /home/mintcity/public_html/v2/inc.cartel.buy.php on line 44 0] <td width="15%"><b><font size="1" face="Verdana, Arial, Helvetica">$<? echo number_format($myrowcs[price]) ?> [<font size="1" face="Verdana, Arial, Helvetica" color="#FFC000"><u><? echo floor(($myrow2b[money] / $myrowcs[price])); ?></u></font>]</font></b></td> This is my code on line 44. Any help would be greatly appreciated.
×
×
  • 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.