Jump to content

SieRobin

Members
  • Posts

    212
  • Joined

  • Last visited

    Never

Everything posted by SieRobin

  1. Line 7 is just <?php Uhmn basically I'm just posting the image, with an HTML tag, <img src and such. How should I do it?
  2. Ok so I changed around a few things that I thought were wrong just to see if that was it. But not I just get jibberish haha. [code]$img_name = "userimages/$pstats3[uimage]"; $max_width    = 150; // maximum x aperture  in pixels $max_height   = 150; // maximum y aperture in pixels $size=getimagesize($img_name); $width_ratio=($size[0] / $max_width); $height_ratio =($size[1] / $max_height); if($width_ratio>=$height_ratio) {    $ratio=$width_ratio; } else {    $ratio=$height_ratio; } $new_width=($size[0] / $ratio); $new_height=($size[1] / $ratio); header("Content-Type: image/jpeg"); $src_img = imagecreatefromjpeg($img_name); $thumb = imagecreatetruecolor($new_width,$new_height); imagecopyresampled($thumb, $src_img, 0,0,0,0,($new_width-1),($new_height-1),$size[0],$size[1]); imagejpeg($thumb); imagedestroy($src_img); imagedestroy($thumb);[/code] And now I get this. [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]Warning: Cannot modify header information - headers already sent by (output started at /home/sierobin/public_html/forum.php:7) in /home/sierobin/public_html/forum.php on line 89 ÿØÿàJFIFÿþ>CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), default quality ÿÛC    $.' ",#(7),01444'9=82<.342ÿÛC  2!!22222222222222222222222222222222222222222222222222ÿÀ–p"ÿÄ ÿĵ}!1AQa"q2?‘¡#B±ÁRÑð$3br‚ %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyzƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖ×ØÙÚáâãäåæçèéêñòóôõö÷øùúÿÄ ÿĵw!1AQaq"2?B‘¡±Á #3RðbrÑ $4á%ñ&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz‚ƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖ×ØÙÚâãäåæçèéêòóôõö÷øùúÿÚ ?ñ×¼ÂG#pù½ë¶ðì¬tx[<ÿú«Î”áJñŸS]w†u«T´k{‡y_6æ<J*ÄØén]±šM4yít»ð8ìN0??d˯Z^]­´d,g€äõ?áN:„nðC‹ò–YãÊ‘E ¿ $#­Ã»·ßù@U5ÓØxžî$¶²û,Mµn,Fp:Õ½B1lWÇåYö—1ËGRÀÁö¢ì Æ? ýô÷Þx€Hw2ã æ? øbyµ¬»ãt¤+?£&¢½»{‹§¶g ª÷ší<˜·!$"ˆ¯¾÷~ÔîÀžíì|9bÖ–r(¼`åÆJúŸ¯µsƒ[±šXmͺ•Œœ3O½Kñk{Y-Ø M¬iàŽ¾õÃÚÜ¡ygâ_,n(3ó{}*æÜÖ.ÛÚéÖr4FÚ!¿;‹€{ÕkýNÎÙð‹†7¡®^ok•†Þ xXã=*µÕËÜD²ÜFë3®xà~T(XrškCÛt Ë[½%Ýc?8 ¨1ÍQñeô/áÍ^¸?XÏ¿Ë ˆÆÃÉ?ä×'àÅض¹A hÎv#¿ó®çÄ6Ë‚µ± !PX\p‹€0?T™“V>}–ßlÊ#?!»U?P9q[Í1C–©ã×5Bm6czˆ#lI’¼uÖªè’nZÙîãvÝ ¦9Á­ë«#oáø¦¶W[Ÿ•²¼ê*¾œÃOŽE•E‘—äÇ+Œûzÿ*šêý¢?¯HØd NVØ¿µšM7«#ä#Ÿ^5wJK+{…pÌÚÁœýÜqŠ«a2ÞÈa0?'߇봛íZ#w%†8¬ÜŸa—¦HÞúg6àîürió´Î|°ÊÝ´½kÌäiaòߎ0xæ»ëry±]2o6ÁÇÿZš–š‰nTø™e-ÛÚÞZ?2Î5òðˆ@V'ò9öô¬ÏCm§C{y|„™"ò£B¹Ü-úq^…âè[Tðìñ[Ã1)‰lÀãë\4"óÃp[Gù‘Hw»6ý SoKW½rK_ XÞB÷ö ʪÄÝxÏ\dô®X‘ä¾_5@)…Àé]nž÷²[2¬Ñý?6E?_ë\þ¯nÏ2¾ß›nO×5)êiR:hoøî ؆`|çÃ°È W§xÓP³‡Ázä-u;é÷ ¨\I?°¯(ðv?šŸ‰míîIùaŸõ¯@Õô‹¼âKhÊC§Ü´E†H!>µ´‡,÷<»N”.•$¦Ú) ·'fOoñ«7ú”šžŸäÍj± tÄcËÚG~¿…/‡Q—ú²„ÊËù/øVÆ?iw«êŽb³Šm±ÈäFÁüëI7{#4Ž+N‰eŸ÷²(Sœ—ëÒ£Õ­[ÊŽdÃD¼ s‘]cøhéºÜ×7N‘2 ’;xFåÉ0$ôÛ5?«y×zu²ÛÆ1òq…ÉDZ’.Ú†µ?DÒ‚Í Ïy:~ò@7}?N+ŸÔngÕ¯{gg‘¾Dþµ`Es‘HÕO\±'¥užœM¨Éx¯˜Ô9$š‡±¬9^Œæo,5=!ѯí&€`€Ädcê)ÚþÝVíСgŽsÞ½{Ô•ž‰)26· þÈ‹ M'Ä6ב[ù?ÌYç ýÑS)­…RŸ³g±¼Ó½¹c|2àïu^õç—Öqè¼²Émþ‹qóß?8Îx®†?Z3GX\‚ÜcƒÏjÝñî‚óéQ^2m I$wöç5j- Œ¬ÎAo亶IÒùV5ÀÅb_´NFU»+{†±T‚ÐɳŒÆ3?­hiÚ×W.›ÊV`6/$þ=ªãFO¡r¬­©—£Iwoâ8ÐÞY??œšô+øcƒÀþ#_)Òâ]&áØ°?6#lŸÌ×M¢øGL°’+¨"ÍÂ?ªÝ‡©÷5oÆPÇÃïùi?ý—t>¿ºj¾NSI=?ÑæŠ2þÒxÂ4LËÈàgð¬áâµðåÁº³E2¾GÊÝ0k]l–ûM¾±t?¾œ»I‘?ò®Vo ¤r0h™ u9Ãg<ñÅgæÇ´´4µÛýsXš`Ö 2HªÛã—iÆäÇ¥X´¿Óì5hmnmä?"o”¸`}y­Ë}$±3Bbdn0à ?Ö¤?O -Ãy6ònbwhÏN™?•91$yþ¿µÞ¤ÒéÖo dôÆpSZÞO"ÒâR¢G …† â·žæÆêèY­Œ-8ùSl`gÔ`¾ž½¼/s·I ‰$Û´˜ZÇ?ü&ñ£ozLäµûß+R†¸üj˜£†×}ÊÄNG”Eü[­[Õ<-«I­Ú¬³Zy×2ùqªJòqÐ3Eö?6•y4{ß>ß5×,æ´§FÆ5åÍ;ô=áÝ­î§yÅÍåµÝ…²|¦=¬wö qœŽ¿•zV­¥?WOxØ)Àëžð¶‘ÿ×… …Ô ‡>dåGñ7oÃ?]¾­f#\.ñÔfºc–†w¹æ³xbm þhò¤8lgƒèkOÃk_j‹!Söx~fÀàžÀšíç—KÔ£•ãuo¼­ÐÔðEi+S þ V¾Óݵ‰åÖäØc€¸¦¬OœxÄj: .çÿE5oÇØŽk˜ñÌËÿ/ˆÔžN?sÿ¢š±µÊ<®òê 2öéVɈÜÂA–àrrsÞ¬h·ÖÚ„¾]¼2FËPýk–ñ>¿m©ÐÌÒÛ?xÆ*_k–¦WNC•?xàuéXkÔë”ir®W©èkm|ž8â?·*ŒŠÏˆþêi´%?Å?¦jLùY™¯ÙCo"ßÚÒlà…zšå.¯.l.AI™†îÆOô®×R™ï UÝö츽9® Q´¸ŸP[pv0ÈÜÁˆ?&¥é$ËWähuÃêsj’Çn‹*£nIÀêEkxwE½Ö5TkØdŠiG‘˜Äíüj_èZÔn"™ÞHI@Ÿ‹c5Õ_ßG¥Z hOÍŽOrjÜ»wÕ?.­­Å4DZÌVnŒ€þ•nÛEÓÖ6¹†X¥e?Xõ¯5±²»Ö¯’ÀÊGlÜpkÙ"M?,R«|£ÅuB|ÈÆqQzEѼ ­tí?âß‚~¸ø{G+ò^\)õgúVŠÛ[+d*“î)åÑGÊ‘ñÛZ÷ Å}ÕŠ–Óu†“òÎ\k›ñ^¬n<#®Át<«¡ap öÝ·"º›ùT¡ßlý×Á¯;ñ£$žÕ†åZM‚í¸caïMè‚×<Ä7«ªÞ]¤…Ñä%K ;VˆÖ´ø¢†=*(”€K¯-øší5ŸévË,Fâ+­Äº vÀí\ì>±±›Éh®Bzë\Ü—FžÒÍŽ·ÔÛ`(ì¹íšë4]\eK…3`|¬Ëœrx¬¸|;7ï´éœÂP+rÖK8ÂÅáÈøþ'¹lŸÈÔJ?úš*¦´¦?Üáôn*È×4øòc1/©¬fšÞNC€ÛËÿ?`kwz?"íZÝŸøc•ŸÔƒKÙù•í‘×]xš§Ë?®'WÖ²í<§$ðŠ;ÔÖma¨ØÛËs8óÆ×'"´.ôH"µ,¶_iD9oÖ…˜JµÑ7ƒnŽ·wai(¦åe•OC³ŸÇ½{2ÚÉü{Þ2ŽË!ÈÕƒáXh¢çÊÅܪ sÄy꿽t3D—?¥_ï!ä×DtÐçnär´¾€J¿ß„üß•eÝN€ñ3nôa´þµ<çOLæ{«vúY³_Z¯ ]ö| Õ¢vBîóq+ÃEä×-â8Ùô a?Yq§Ü¹ÿVÝ«®’íYIUÔ.Gr±ñÅs^"ºy¼3¯(¶6ð?:”¦ >[u'©¨¨ô*+QZämCïU5½:(4?í7,×°Ùƒ€€ÔÒK©Ø"á®#'Ñy¨5½zÂûC†Ê"D9$Ž:Ô¾ÄNQ¶å¯˜`IÏ$U{íF+ ×R¬q?Õ?'è+2ëÅZ”±… À.ó?Ä{ ó­WV»Õ/ ÷?–G°¨p”_¼R’{.¥ãGrÉcÅ?òÑúþUÉÞ\Ë+½Ì?#0Á$Õ4zÒ‚=iÙ Óð¾³6‡tù?^'Jç;ƒ_Eø> -CGƒUŽUœÊ¼ «nàû×Ïú…µ?IºÖ?ƒ†šN}=kÙü+¡Éá?1íc¾•üÒðp¹öªy£v\a)-IL§S•>´ÉÂãågOu5Å^\Ë ×Aì\Ô ~íÏŸ ›Í/n»}]÷:ùR÷º¸½·(j¡;jƒ9ž(ǨLW?öÆQÄÎ>ŽE'ÚÃrò÷cšX]…õ~ìÑx¤µÖ©3‘üòOôÎx£x𦹻"?°NK?êÛ©­{ÏÍX~*¿?¼-« aóYL?ñÃYʬ¥¡¢¥«ž`÷dã,y¨Ì¬N3úÖH› J—'×èûKž_! × ÈíÍf]ÏîÏ?²zŽC…V™Ì“œ“í@5„çÌmس¥é·Z¶¡ ?ªo–S€:©>•ê:Ã;;B³êl.åˆ×ˆÇøÒ|?ðèÓ¬—S¹\]Ý©)ê‘÷?Ž+®{µ†5?d}ˆ×Ë9»ÙÔ©+^Eø"ŽÚ5ŽTU  õòZÆrrõ‘{®­?ו, ÊãåQZz†`×mî}VF…¸+ lç¸ÜsúT¨6Tê(œÍή·2B6ž@íP?jÊ3´Ý°>›I¯M±ðÎ?¦Ä¢+;~?Ž\1?‰«’Ï¥Ù&[ìè÷TUû$cíÙäm­[»tÿ÷é¿ÂªÜk.¨|©KÀJô{ÿiÖÙ[t?°®~çÄÚ¾¤JB« g¹â?f?ÖgúõÛp šÏÕõ+ÉtkÕu`­€ñþÉ®ÒmíäÎBäcŽ¬{XÞ œÅ¡êKq )ÚJ#Á{iÜžýk6Ô]†œ¤Žz%˜i§Ö’;u.Ñõë–¹H`¸t‚v™ù]—nGÒ»~+½rè*ÏåY§¸$“êk3þKl|×îõÅw*S8ÝHÖy¯i¦ÿY²µ"Y‘OÓ<Óu+ìë?ýêFCŠ·áiÒßÄvsH芌Ig8ƒÞ²’hÖ“G­Çªª^jR;–ª!Œvªú†±nš¦›ó±w9÷!N+’Ó5%½·×ðÁ¼ÉASž£dU][VE}'QGL(LžA5ÏÊw9ér—‰5ù‰Öæ åŽèA¯Hð÷Å{iôÄ·û BaP¥WzWˆj—)qª<‘°eÆÁ|°Û?Ç#ÚŠ+3NgkªH5ÔøgÄúfŽ#ûT/‰·¿–ªr¼qËCEq܆M¯x³JÔ#–;.ãF?8"Œxá?bE«Û¨!£~xÝ€HLÑEŽãÞ/ð?©-õ–µ{r9!¢?Ëéæsø×t>?xYWjéÚÀP0†/þ9E†ŽK[øÇo¬3/‘y¿ðÄqøüÜ×#¨ø¶ÊúÒá WY#dMʸ\ŒzÑE [/quote]
  3. I get like a series of errors from that hehe. [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]Warning: getimagesize(): Read error! in /home/sierobin/public_html/forum.php on line 76 Warning: Division by zero in /home/sierobin/public_html/forum.php on line 89 Warning: Division by zero in /home/sierobin/public_html/forum.php on line 90 Warning: Cannot modify header information - headers already sent by (output started at /home/sierobin/public_html/forum.php:7) in /home/sierobin/public_html/forum.php on line 91 Warning: imagecreatefromjpeg(): gd-jpeg: JPEG library reports unrecoverable error: in /home/sierobin/public_html/forum.php on line 92 Warning: imagecreatefromjpeg(): '/' is not a valid JPEG file in /home/sierobin/public_html/forum.php on line 92 Warning: imagecreatetruecolor(): Invalid image dimensions in /home/sierobin/public_html/forum.php on line 93 Warning: imagecopyresampled(): supplied argument is not a valid Image resource in /home/sierobin/public_html/forum.php on line 94 Warning: imagejpeg(): supplied argument is not a valid Image resource in /home/sierobin/public_html/forum.php on line 95 Warning: imagedestroy(): supplied argument is not a valid Image resource in /home/sierobin/public_html/forum.php on line 96 Warning: imagedestroy(): supplied argument is not a valid Image resource in /home/sierobin/public_html/forum.php on line 97[/quote]
  4. I had looked at the manual, but I still can't seem to figure it out, it just makes little sense to me, so if someone could make sense of it to me, I'd appreciate that lol. I guess all I want is something like this. If the original size of the image succeeds 150x150 rescale the image so it's not over 150x150.
  5. I've been looking into this for a few hours now and I can't seem to figure it out, so here I am asking you for help :P Alright I have it set so you can upload one image which will be your profile image and your forum post image, how exactly do I set it so that it resizes the image in the forum so it doesn't pass 150x150? Pixels that is. Basically I want to do this so it doesn't show so huge, and rather just like a thumbnail. Any provided information is appreciated.
  6. Yeah I fixed that actually, but now it's just posting the titles for the started thread, and not the reply title.
  7. Column 'timep' in order clause is ambiguous That's what it says lol. I think I might have gotten it figured out, but just one thing. The only thing it's doing weird, is that it's using the same title as in the thread title. So the replies never log actual titles, hmmn.
  8. Nope, this is what I get. Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/sierobin/public_html/forum.php on line 101
  9. Alright thanks hitman, I'll try that out and let you know if it works.
  10. [code]<?php session_start(); if(!(isset($_SESSION['results']))) { session_register(results); }[/code] Why exactly would you put an extra parenthesis? [code]<?php session_start(); if(!isset($_SESSION['results'])) { session_register(results); } ?>[/code] Try that.
  11. I have a forum on my website, and when you go to forum.php there is "Last Posts" that I've created to show who last posted what. Now what it displays is the Title of the reply and the Author. The problem I'm having is that in the MySQL Database there are two different tables, f_thread and f_post. In f_threads it displays all the newly started threads f_post is just the replies to the threads, and they're ordered by a number containing. How can I make it display both newly started threads and replies on the Last Posts thing, so that when someone posts a new thread it also displays as a last post. Perhaps there is a way to use one query to pull the tables both? I'm not sure, but hmmn, if someone could help I'd appreciate it. [code]    $last="SELECT * FROM  f_post order by timep DESC limit 5";     $last2=mysql_query($last) or die("Could not retrieve posts");     print "</table>     <br><table class='table'><tr class='headline'><td align='center' colspan='2'>Last Posts</td></tr>     <tr><td class='mainrowb'>Title</td><td class='mainrowb'>Author</td></tr>";     while ($last3=mysql_fetch_array($last2)) {     print "<tr class='mainrow'><td><a href='forum.php?brd=$last3[bname]&msg=$last3[msg]'>$last3[title]</a></td><td><a href='profile.php?id=$last3[UID]'>$last3[author]</a></td></tr>";       }[/code]
  12. I have a chat on my website, and I was wondering if there was a way to delete the last row in the table of your database once the number of messages reaches a certain amount? Basically I just want it so, if the number of posts reaches 30, it deletes the last message in the table, so there is a constant 30 messages, instead of deleting everything.
  13. I believe I've got it, thank you anyhow :]
  14. Ok there are many users on the website. For each quote to be posted, it has to select the person from the database, not just the first person. [code]<?php //Do database connection first $sql = mysql_query("SELECT * from quote_table WHERE userid='$user_id'"); $row = mysql_fetch_array($sql); var_dump($row); echo $row['column_name']; ?>[/code] This would be ok, if I knew what to define the user ID as, correct? You can't associate the correct ID everytime with the post that has been submitted. Here's the scenario. You have the author's name. The title, the actual post.. and under the post you have the quote, which is like a signature. Instead of having it take it from the users table in the database then inserting it into the the f_post table in the databse, and having an extra line everytime you post a reply, is there a way i could just have it take it right from the users table and post it?
  15. I'm making a forum for my website, and for each idividual user, I'd like them to have their own Quote at the end of every post. I really don't want to log the quote in every post every singly time the user actually posts something. How can I just make it only retrieve that persons quote instead of just the first users quote in the query? If you don't understadnd what I mean, I can elaborate.
  16. EDIT: Problem fixed :] delete post please :D
  17. SieRobin

    Forum

    I'm creating a forum on my website.. all from scratch. Now I'm stuck on this part, I can't seem to figure it out, but perhaps you all could help me out with this. I want all the code in one page, because I don't want to use a million pages for the forum, so I'm using if/else statements in order to display the threads and board names. Here is the script I've written up. [code]<?php session_start(); include 'connect.php'; ?> <link rel="stylesheet" href="style.css" type="text/css"> <title>Feudal Age - Forum</title> <?php include "navigate.php"; if (isset($_SESSION['player']))   {   $player=$_SESSION['player'];   $userstats="SELECT * from users where playername='$player'";   $userstats2=mysql_query($userstats) or die("Could not retrieve the users stats.");   $userstats3=mysql_fetch_array($userstats2);   $brd=$_GET['brd'];     if ($brd==) {            $thread="SELECT * from f_thread where bname='$brd' order by ID ASC";           $thread2=mysql_query($thread) or die ("Could not display threads");           print "<table class='table'><tr class='headline'><td colspan='5'><center>Forum</center></td></tr>         <tr class='headline'><td>Thread</td><td>Author</td><td>Last Poster</td><td>Replies</td><td>Views</td>";         while ($thread3=mysql_fetch_array($thread2)) {         print "<tr class='mainrow'><td><a href='forum.php?brd=1&msg=$thread3[ID]'>$thread3[title]</a></td>         <td><a href='profile.php?id=$userstats3[ID]'>$thread3[author]</center></td><td>$thread3[lastpost]</td><td>$thread3[replies]</td>         <td>$thread3[views]</td></tr>";         }         print "</table>";         } else {     $forum="SELECT * from f_forum order by ID ASC";     $forum2=mysql_query($forum) or die("Could not retrieve the users stats.");     print "<table class='table'><tr class='headline'><td colspan='4'><center>Forum</center></td></tr>     <tr class='headline'><td>Board Name</td><td>Description</td></tr>";     while ($forum3=mysql_fetch_array($forum2)) {     print "<tr class='mainrow'><td><a href='forum.php?brd=$forum3[bname]'>$forum3[fname]</a></td><td>$forum3[desc]</td></tr>";     }     print "</table>";     }   } ?>[/code] Ok, so this line.. [code]$brd=$_GET['brd'];     if ($brd==) {  [/code] I want to be able to like.. display that boards threads without having to put.. [code]if ($brd=="gen") { do something }[/code] I just want it to be able to know which board it's on and to show it's threads, anyone know how to do this? If you don't get what I'm saying I'll try and rephrase it.
  18. Does anyone here use DreamWeaver? I'm currently running DreamWeaver MX 2004, and I'm trying to set up the MySQL database to run through it, but I keep getting some ridiculous error saying that I may not have a test server running? If anyone could explain to me how to use this feature, I would appreciate it greatly.
  19. Use a while loop, and make the query be ordered by ASC or DESC meaning, Ascending or Descending.
  20. Ok this is what I'd do.. I wouldn't GET the information I'd POST it. So in the method change it to post, then change the $_GET to $_POST. As for anything else, why put two different PHP begin and end tags for each echo? Just use one. [code]<?php if (isset($_POST['submit'])) { $fname=$_POST['firstName']; $lname=$_POST['firstName']; print "$fname $lname"; } ?>[/code] You don't really need a session to start since this is only the registration, the session would start when they go to log in. Let me know if this helps.
  21. I'll let you know if it works :D Works :] thank you very much for yourhelp michaellunsford!
  22. Oops, sorry about that.. [code]<?php include "connect.php";     $stats="SELECT * from users";     $stats2=mysql_query($stats) or die("Could not retrieve the users stats.");     $stats3=mysql_fetch_array($stats2);     if ($stats3['dead']=='Alive') {           if ($stats3['race']=='Troll') {         mysql_query("update users set hp=(hp+2) where hp<mhp") or die("Could not query.");         } else {         mysql_query("update users set hp=(hp+1) where hp<mhp") or die("Could not query.");       }   } ?>[/code]
  23. Ok, so I'm running a web-based RPG, and I have 3 cron jobs set up. I have turns set at every 6 minutes, Hit Points regeneration every 5 minutes, and revive if dead over 30 minutes. My problem is, is that I want it to be able to query something if they're alive but are missing HP it will tick 1 HP every 5 minutes. The way I currently have it set up, doesn't work, because if you set a session for it, all it will really do is tick if you're logged in and missing HP and also it will only revive you if you're logged in. The other way I tried doing it was removing the session and just pulling it from the users.. well it will always tick, but if they're dead it will still tick, if they're dead I don't want them to recieve HP. Does anyone have any ideas on how I could set this up, so it will only query HP Regen if you're Alive and query Revive only if you're Dead. Thanks for the help in advanced :D Regen Over-Time [code]<?php session_start();     include "connect.php"; if (isset($_SESSION['player']))     {     $player=$_SESSION['player'];     $stats="SELECT * from users";     $stats2=mysql_query($stats) or die("Could not retrieve the users stats.");     $stats3=mysql_fetch_array($stats2);     if ($stats3['dead']=='Dead')         {         mysql_query("update users set hp=1, dead='Alive'") or die("Could not query");         }     } ?>[/code] Revive Over-Time [code]<?php session_start();     include "connect.php"; if (isset($_SESSION['player']))     {     $player=$_SESSION['player'];     $stats="SELECT * from users";     $stats2=mysql_query($stats) or die("Could not retrieve the users stats.");     $stats3=mysql_fetch_array($stats2);     if ($stats3['dead']=='Dead')         {         mysql_query("update users set hp=1, dead='Alive'") or die("Could not query");         }     } ?>[/code]
  24. SieRobin

    Cron

    I know this probably doesn't belong in here, but everyone here has actually given me legit help so I figured I'd ask. I'm trying to set up a cron job to run turns on my MMORPG Web Based website, but I'm not very familiar with cron, so what command do I need to run to do this?
×
×
  • 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.