Jump to content

thegod

Members
  • Posts

    28
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

thegod's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in what does this mean
  2. do but only the back ground comes out now help me ??? please
  3. if i killed the users account so if they banned and DEAD JUST TELLIN ME what is what
  4. /////Rankl1123467 $administrator= mysql_num_rows(mysql_query("SELECT username FROM user_info WHERE rank = 'Administrator'"))or die(mysql_error()); /////Rankl11234678 $hdo= mysql_num_rows(mysql_query("SELECT username FROM user_info WHERE rank = 'Help Desk Oparator'"))or die(mysql_error()); /////user_info DEAD $dead= mysql_num_rows(mysql_query("SELECT username FROM user_info WHERE status = 'Dead'"))or die(mysql_error()); /////TOTAL ATTEMPTS $attempts= mysql_num_rows(mysql_query("SELECT id FROM attempts WHERE outcome = 'Survived'"))or die(mysql_error()); $result11111swiss = mysql_query("SELECT money FROM swiss"); $moneyswiss = 0; while($rowswiss=mysql_fetch_array($result11111swiss)){ $moneyswiss+=$rowswiss[0];
  5. Parse error: parse error, unexpected T_VARIABLE in rankstatus.php on line 110 this is the 2nd line is 110 i have no idea DEAD $dead= mysql_num_rows(mysql_query("SELECT username FROM user_info WHERE status = 'Dead'"))or die(mysql_error()); many thanks
  6. here is the coding when people reply use a textarea it does submit it into the database look i marked it in red <? include_once 'includes/functions.php'; include_once 'includes/replace.php'; logincheck(); $forum=$_GET['forum']; $username=$_SESSION['username']; $viewtopic = $_GET['viewtopic']; $forum_look=$_GET['forum_look']; $fetch=mysql_fetch_object(mysql_query("SELECT * FROM user_info WHERE username='$username'")); $forumquote = mysql_query("SELECT * FROM user_info WHERE username = '$right->username'"); $fq = mysql_fetch_object($forumquote); if (!$viewtopic){ $viewtopic = "1"; } $fetch=mysql_fetch_object(mysql_query("SELECT * FROM user_info WHERE username='$username'")); if ($forum == "Crew" && $fetch->crew != "0"){ $crew="1"; } $owner=mysql_num_rows(mysql_query("SELECT * FROM crews WHERE owner='$username' OR rhm='$username'")); $userlevel=$fetch->userlevel; $ggee = mysql_query("SELECT locked, sticky, lastreply FROM topics WHERE id='$viewtopic' AND forum='$forum'"); while($dsdsd = mysql_fetch_row($ggee)){ $lockedornot = $dsdsd[0]; $stikornot = $dsdsd[1]; $lastreplyit = $dsdsd[2]; } if ($lockedornot == '1'){ echo "This topic is locked."; }elseif ($userlevel != '0' || $lockedornot != '1'){ if ($crew == "1"){ $gg = mysql_query("SELECT * FROM topics WHERE id='$viewtopic' AND forum='$forum' AND crew='$fetch->crew'"); }else{ $gg = mysql_query("SELECT * FROM topics WHERE id='$viewtopic' AND forum='$forum'"); } while($success = mysql_fetch_row($gg)){ $username1 = $success[1]; $topictext = $success[3]; $made = $success[8]; } $forumquote2 = mysql_query("SELECT * FROM user_info WHERE username = '$username1'"); $fq2 = mysql_fetch_object($forumquote2); ?> <style type="text/css"> <!-- .style2 {font-size: 10px} --> </style> <link href="includes/forum.css" rel="stylesheet" type="text/css"> <table width=100% border=1 cellpadding=0 cellspacing=0 bordercolor=#000000 class=thinline> <tr> <td class="header" colspan=2><center>Topic Made By : <? echo "<a href='profile.php?viewuser=$username1' target=mainFrame>$username1</a>"; ?> On :<?php echo "$made"; ?></td> </tr> <tr> <td width='8%' rowspan='3' bgcolor=#777777> <center> <img src='<? echo"$fq2->forumpic"; ?>' hight='65' width='65' align='center'> <span class=style2><? echo"$fq2->posts"; ?> Posts</span> </td> </tr> <tr> <td height="134" bgcolor="#777777"> <? echo replace($topictext); if ($topictext == ""){ $topictext = "Main Forum";}?></td> </tr> <tr> <td height='21' colspan='1' bgcolor=#777777> <div align=center><? echo"$fetch->forumquote"; ?></div></td> </tr> </table><br> <p> <?php $forum_count = 15; function index_navigation($index, $count, $num) { $forum = $_GET['forum']; $viewtopic = $_GET['viewtopic']; if ($index != 0) { print "<a class='linktext' href=\"right.php?forum=$forum&viewtopic=$viewtopic&forum_look=" . ($index - $count) . "\">Previous</a> "; } if ($num == $count) { print " <a class='linktext' href=\"right.php?forum=$forum&viewtopic=$viewtopic&forum_look=" . ($index + $count) . "\">Next</a>"; } } if (! isset($forum_look) ) { $forum_look = 0; } if ($crew == "1"){ $query="SELECT * FROM replys WHERE idto = '$viewtopic' AND forum='$forum' AND crew='$fetch->crew' ORDER by `id` DESC LIMIT $forum_look, $forum_count"; }else{ $query="SELECT * FROM replys WHERE idto = '$viewtopic' AND forum='$forum' ORDER by `id` DESC LIMIT $forum_look, $forum_count"; } $query=mysql_query("$query"); $num=mysql_num_rows($query); while($right=mysql_fetch_object($query)){ if ($fetch->userlevel == "0"){ $forumquote = mysql_query("SELECT * FROM user_info WHERE username = '$right->username'"); $fq = mysql_fetch_object($forumquote); if($fq->gender == "Dont State") { $gender = "ds.PNG"; } if($fq->gender == "Male") { $gender = "male.gif"; } if($fq->gender == "Female") { $gender = "female.gif"; } if ($fq->posts >= "0" && $fq->posts < "80"){ $forumrank = "Forum Bum"; } if ($fq->posts >= "81" && $fq->posts < "160"){ $forumrank = "Curb Crawler"; } if ($fq->posts >= "161" && $fq->posts < "220"){ $forumrank = "Post Star"; } if ($fq->posts >= "221" && $fq->posts < "290"){ $forumrank = "V.I.Poster"; } if ($fq->posts >= "291"){ $forumrank = "Post Whore"; } if ($fq->posts >= "0" && $fq->posts < "80"){ $forumpic = "1.jpg"; } if ($fq->posts >= "81" && $fq->posts < "160"){ $forumpic = "2.jpg"; } if ($fq->posts >= "161" && $fq->posts < "220"){ $forumpic = "3.jpg"; } if ($fq->posts >= "221" && $fq->posts < "290"){ $forumpic = "4.jpg"; } if ($fq->posts >= "291"){ $forumpic = "5.jpg"; } echo "<table width=100% height=178 border=1 cellpadding=0 cellspacing=0 bordercolor=#000000 class=\"background\"> <tr> <td height=21 colspan=2 class=\"header\"><div align=center><a href='profile.php?viewuser=$right->username' target=mainFrame>$right->username</a> <b>On:</b> $right->made</div></td> </tr> <tr> <td width='8%' rowspan='3' bgcolor=#777777> <center> <img src='$fq->forumpic' hight='65' width='65' align='center'> <span class=style2>$fq->posts Posts</span> <img src='$forumpic'> <span class=style2>$forumrank</span> <br><img src='$gender'> </td> </tr> <tr> <td width=92% height='134' class='topictext' bgcolor='#ffffff'>"; echo replace($right->text); echo "</td> </tr> <tr> <td height='21' colspan='1' bgcolor=#ffffff> <div align=center><font color=000000>$fq->forumquote</div></td> </tr> </table><br> <p>"; }elseif ($fetch->userlevel =! "0"){ $forumquote = mysql_query("SELECT * FROM user_info WHERE username = '$right->username'"); $fq = mysql_fetch_object($forumquote); if($fq->gender == "Dont State") { $gender = "ds.PNG"; } if($fq->gender == "Male") { $gender = "male.gif"; } if($fq->gender == "Female") { $gender = "female.gif"; } if ($fq->posts >= "0" && $fq->posts < "80"){ $forumrank = "Forum Bum"; } if ($fq->posts >= "81" && $fq->posts < "160"){ $forumrank = "Curb Crawler"; } if ($fq->posts >= "161" && $fq->posts < "220"){ $forumrank = "Post Star"; } if ($fq->posts >= "221" && $fq->posts < "290"){ $forumrank = "V.I.Poster"; } if ($fq->posts >= "291"){ $forumrank = "Post Whore"; } if ($fq->posts >= "0" && $fq->posts < "80"){ $forumpic = "1.jpg"; } if ($fq->posts >= "81" && $fq->posts < "160"){ $forumpic = "2.jpg"; } if ($fq->posts >= "161" && $fq->posts < "220"){ $forumpic = "3.jpg"; } if ($fq->posts >= "221" && $fq->posts < "290"){ $forumpic = "4.jpg"; } if ($fq->posts >= "291"){ $forumpic = "5.jpg"; } echo "<table width=100% height=178 border=1 cellpadding=0 cellspacing=0 bordercolor=#000000 class=\"background\"> <tr> <td height=21 colspan=2 class=\"header\"><div align=center><a href='right.php?clean=$right->id&forum=$forum&viewtopic=$viewtopic'><font color=red>Delete</font></a> <a href='profile.php?viewuser=$right->username' target=mainFrame>$right->username</a> <b>On:</b> $right->made</div></td> </tr> <tr> <td width='8%' rowspan='3' bgcolor=#777777> <center> <img src='$fq->forumpic' hight='65' width='65' align='center'> <span class=style2>$fq->posts Posts</span> <img src='$forumpic'> <span class=style2>$forumrank</span> <br><img src='$gender'> </td> </tr> <tr> <td width=92% height='134' class='topictext' bgcolor='#ffffff'>"; echo replace($right->text); echo "</td> </tr> <tr> <td height='21' colspan='1' bgcolor=#ffffff> <div align=center><font color=000000>$fq->forumquote</div></td> </tr> </table><br> <p>"; } } if($_GET[clean]) { $clean=$_GET[clean]; if($userlevel == '0'){ echo "Error."; exit; }else mysql_query("DELETE FROM replys WHERE id='$clean' AND forum='$forum'") or die ("Cannot delete reply"); echo "Reply Deleted"; echo "<SCRIPT LANGUAGE='JavaScript'> window.location='right.php?forum=$forum&viewtopic=$g'; </script>"; } ?> <?php index_navigation($forum_look, $forum_count, $num); ?> <br> <br> <? if (!$viewtopic){ $viewtopic = "1"; } if(strip_tags($_POST['Submit']) && strip_tags($_POST['reply_text']) && $forum && $viewtopic){ $reply_text = addslashes(strip_tags($_POST['reply_text'])); $topic_info=mysql_fetch_object(mysql_query("SELECT * FROM topics WHERE id='$viewtopic' AND forum='$forum'")); if ($topic_info->sticky == "1"){ $lastreplytime = $topic_info->lastreply; }elseif ($stikornot == "0"){ $lastreplytime = time(); } if ($topic_info->locked == "1"){ echo "This topic is locked."; exit(); } $date = gmdate('Y-m-d h:i:s'); if ($crew == "1" && $fetch->crew != "0"){ mysql_query("INSERT INTO `replys` (`id`, `username`, `text`, `forum`, `idto`,`made`,`crew`) VALUES ('', '$username', '$reply_text', '$forum', '$viewtopic','$date','$fetch->crew');") or die (mysql_error()); }else{ mysql_query("INSERT INTO `replys` (`id`, `username`, `text`, `forum`, `idto`,`made`) VALUES ('', '$username', '$reply_text', '$forum', '$viewtopic','$date');") or die (mysql_error()); here is what am wanting to submit in to the table look down the code you'll see the textarea } mysql_query("UPDATE `user_info` SET `posts` = `posts`+1 WHERE username='$username'"); mysql_query("UPDATE topics SET lastreply='$lastreplytime' WHERE id='$viewtopic' AND sticky='0'"); mysql_query("UPDATE `user_info` SET `posts` = `posts`+1 WHERE username='$username'"); echo " <SCRIPT LANGUAGE='JavaScript'> window.location='right.php?forum=$forum&viewtopic=$viewtopic'; </script>"; } ?> <script language=JavaScript> function so(dis) { for (i=0;i<dis.elements.length;i++){ if (dis.elements.type=='submit') dis.elements.style.visibility='hidden'; } if(fs==false){ fs=true; return true; }else return false; } function goaway() { for(i=0;i<document.forms.length;i++) document.forms.onsubmit = function() {return so(this);}; } </script><body onload=goaway();> <form action='' method=post> <input name="forumto" type="hidden" value="<?php echo "$forum"; ?>"> <input name="this" type="hidden" id="this" value="<?php echo "$viewtopic"; ?>"> <center><a href="bbcode.php"><img src="../images/bbcodes.jpg" border="0"></a> <a href="color.php"><img src="../images/colours.jpg" border="0"></a></center> <table class=titletext border=0 cellspacing=0 cellpadding=2 width=100% bordercolor="black"> <tr> <td class="header"> Reply: </td> </tr> <tr> <td > <textarea name="reply_text" cols="" rows="5" class="topictext" id="reply_text" style="width: 90%;"></textarea> <br> </td> </tr> <tr> <td width=33% class=thinline><input name=Submit type=submit class="submit" value=Submit></td> here is they submit button submit the textarea named reply text </tr> </table> </form> <? } ?> <? mysql_close(); ?>
  7. or that could mean they is code before the session regiter only the <?php tag should be before it
  8. thegod

    Coding

    you should not be giving other sites out but search for this there is alot of scripts to help you
  9. Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in tops.php on line 33 Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in tops.php on line 56 Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in tops.php on line 76 i have point the lines out in red this is tops coding <? session_start(); include "includes/functions.php"; logincheck(); $username=$_SESSION['username']; include "includes/db_connect.php"; echo "$style"; ?> <center><html><head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <table width="100%" border="0" cellspacing="4" cellpadding="2"> <tr> <td width="274" height="122" valign="top"><table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="<?php echo "$td_border"; ?>" bgcolor="#666666"> <tr> <td height="22" colspan="2" background="includes/grad.jpg"><center class="TableHeading"> <font color="#FFFFFF">Top 10 Ranks </center></td> </tr> <tr> <td width="127" height="10" valign="top"><b>Username</b></td> <td width="136" valign="top"><b>Rank</b></td> </tr> <center><?php $tsel = mysql_query("select * from `users` where `userlevel`='0' and `status`='alive' order by `rank` desc limit 10"); while ($top=mysql_fetch_array($tsel)) { line 36 print "<tr><td></center><a href=profile.php?viewuser=$top[username]>$top[username]</a></td><td align=right>$top[rank]</td></tr>"; } ?> </table> <br> <br> <table width="100%" border="0" cellspacing="2" cellpadding="0" align="center"> <tr> <td width="200%" height="122" valign="top"><table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="<?php echo "$td_border"; ?>" bgcolor="#666666"> <tr> <td height="22" colspan="2" background="includes/grad.jpg"><center class="TableHeading"> <font color="#FFFFFF">10 Richest Players </center></td> </tr> <tr> <td width="127" height="10" valign="top"><b>Username</b></td> <td width="136" valign="top"><b>Rank</b></td> </tr> <?php $tsel = mysql_query("select * from `users` where `userlevel`='0' and `status`='alive' order by `money` desc limit 10"); while ($top = mysql_fetch_array($tsel)) { Line 56 print "<tr><td><a href=profile.php?viewuser=$top[username]>$top[username]</a></td><td align=right>$top[rank]</td></</tr>"; } ?> </table> <table width="100%" border="0" cellspacing="4" cellpadding="2"> <tr> <td width="274" height="122" valign="top"><table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="<?php echo "$td_border"; ?>" bgcolor="#666666"> <tr> <td height="22" colspan="2" background="includes/grad.jpg"><center class="TableHeading"> <font color="#FFFFFF">Top 10 Forum Posters </center></td> </tr> <tr> <td width="127" height="10" valign="top"><b>Username</b></td> <td width="136" valign="top"><b>Posts</b></td> </tr> <center><?php $tsel = mysql_query("select * from `users` where `userlevel`='0' and `status`='alive' order by `posts` desc limit 10"); while ($top = mysql_fetch_array($tsel)) { line 76 print "<tr><td></center><a href=profile.php?viewuser=$top[username]>$top[username]</a></td><td align=right>$top[posts]</td></tr>"; } ?> </table> <br> <br> </td> </table> </body> </html></center>
  10. Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in tops.php on line 33 Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in tops.php on line 56 Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in tops.php on line 76 i have point the lines out in red this is tops coding <? session_start(); include "includes/functions.php"; logincheck(); $username=$_SESSION['username']; include "includes/db_connect.php"; echo "$style"; ?> <center><html><head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <table width="100%" border="0" cellspacing="4" cellpadding="2"> <tr> <td width="274" height="122" valign="top"><table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="<?php echo "$td_border"; ?>" bgcolor="#666666"> <tr> <td height="22" colspan="2" background="includes/grad.jpg"><center class="TableHeading"> <font color="#FFFFFF">Top 10 Ranks </center></td> </tr> <tr> <td width="127" height="10" valign="top"><b>Username</b></td> <td width="136" valign="top"><b>Rank</b></td> </tr> <center><?php $tsel = mysql_query("select * from `users` where `userlevel`='0' and `status`='alive' order by `rank` desc limit 10"); while ($top=mysql_fetch_array($tsel)) { line 36 print "<tr><td></center><a href=profile.php?viewuser=$top[username]>$top[username]</a></td><td align=right>$top[rank]</td></tr>"; } ?> </table> <br> <br> <table width="100%" border="0" cellspacing="2" cellpadding="0" align="center"> <tr> <td width="200%" height="122" valign="top"><table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="<?php echo "$td_border"; ?>" bgcolor="#666666"> <tr> <td height="22" colspan="2" background="includes/grad.jpg"><center class="TableHeading"> <font color="#FFFFFF">10 Richest Players </center></td> </tr> <tr> <td width="127" height="10" valign="top"><b>Username</b></td> <td width="136" valign="top"><b>Rank</b></td> </tr> <?php $tsel = mysql_query("select * from `users` where `userlevel`='0' and `status`='alive' order by `money` desc limit 10"); while ($top = mysql_fetch_array($tsel)) { Line 56 print "<tr><td><a href=profile.php?viewuser=$top[username]>$top[username]</a></td><td align=right>$top[rank]</td></</tr>"; } ?> </table> <table width="100%" border="0" cellspacing="4" cellpadding="2"> <tr> <td width="274" height="122" valign="top"><table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="<?php echo "$td_border"; ?>" bgcolor="#666666"> <tr> <td height="22" colspan="2" background="includes/grad.jpg"><center class="TableHeading"> <font color="#FFFFFF">Top 10 Forum Posters </center></td> </tr> <tr> <td width="127" height="10" valign="top"><b>Username</b></td> <td width="136" valign="top"><b>Posts</b></td> </tr> <center><?php $tsel = mysql_query("select * from `users` where `userlevel`='0' and `status`='alive' order by `posts` desc limit 10"); while ($top = mysql_fetch_array($tsel)) { line 76 print "<tr><td></center><a href=profile.php?viewuser=$top[username]>$top[username]</a></td><td align=right>$top[posts]</td></tr>"; } ?> </table> <br> <br> </td> </table> </body> </html></center>
×
×
  • 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.