Jump to content

dark dude

Members
  • Posts

    53
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

dark dude's Achievements

Member

Member (2/5)

0

Reputation

  1. mysql_query("UPDATE mp3 SET {whichever field holds the band name}='{bandname variable here}', {whichever field holds the song name}='{songname variable here}' WHERE userid = '$bandid'"); might work... I dnno, try it and tell us what happens... And btw, slightly offtopic, but good example band + song given thar :P
  2. Is there any way to prevent my Php script from placing numbers into Standard Form when they exceed a certain point?
  3. Thanks AndyB and Crayon Violet, that worked perfectly. I see why you guys are Global Mods ^^
  4. Not sure if this might work, but have you tried using the <META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE"> html tag?
  5. I'm having some problems with this: [code]$DefBody = '[Some irrelevant code/] <tr><td>Halo Moons</td><td>'.$PresetDefHaloMoonFig.'</td><td>'.$DefHaloMoonFig2.'</td></tr> </table> '.if($DefHaloMoonFig2=='0'){.' The Attacker has won the battle!'. } else {.' The Defender has won the battle! .}';[/code] It doesnt seem to want the if statements there to work :( Any help? Thanks, ~Dark dude~
  6. [quote author=AndyB link=topic=107538.msg431607#msg431607 date=1157896935] Putting more than one value in a field is easy; it's getting them out separately that's the problem. Are you [b]absolutely certain[/b] that that's what you want to do?  One more field in your database table is pretty cheap. [/quote] Yeah, I just want the two variables to merge :P Because my finding system finds "Colonies" by the number after it. The "UpDateNum" variable holds the number that's to go after the name "Colony". So, if there are already 4 colonies, UpDateNum will equal 5, and it will input into the database "Colony5"...
  7. [quote] $num = mysql_numrows($result); $UpDateNum = $num + 1; $query="INSERT INTO Planets VALUES ('','$Galaxy','$System','$Planet','$Continent','',[color=red][b]'Colony'[/b][/color],'$Username','0','500','10','250','100','Colony11','1','','','','','','','','','$ip',CURRENT_TIMESTAMP(NOW()))"; mysql_query($query);[/quote] Focus on the bit in bold red... I want to be able to make it something like: 'Colony(whatever $UpDateNum is)' But I cant find how to do it. I've tried 'Colony'.$UpDateNum.'' but that doesnt work... Please help? ???
  8. I see nothing wrong with that code, it should do exactly what you explained it should do ;)
  9. [quote author=Mouse link=topic=105508.msg422088#msg422088 date=1156539630] "The image “http://localhost/atm-v5/thermo[b][color=red].php[/color][/b]” cannot be displayed, because it contains errors." Hmmm... needs work (note to self: maybe i should just do this in photoshop...!) Any One? Mouse [/quote] I dont believe images use the .php extension ;) Php = Script extension, an Image extension = .gif, .jpg, .png, .tif, .bmp, .psd etc
  10. How do you hide frames? I've managed to get them to hide in Internet Explorer, but it wont hide in Firefox etc... See: http://img297.imageshack.us/img297/1716/borderiie1.png http://img170.imageshack.us/img170/1165/borderte6.png Here are the pages codes (as you can see, some irrelevant bits are cut out): [code]<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE"> <? include("dbinfo.inc.php"); mysql_connect(localhost,$username,$password); @mysql_select_db($database) or die( "Unable to select database"); $query = "SELECT * FROM Processes WHERE Activator='$Username'"; $result = mysql_query($query) or die(mysql_error()); $results = mysql_fetch_array($result); $num=mysql_numrows($result); ?> <FRAMESET COLS=16%,*> <FRAME SRC="sidebar.php?<? echo session_id() ?>" NAME=SIDEBAR FRAMEBORDER=NO NORESIZE> <FRAMESET ROWS=15%,*,<? $m=0; while ($m < $num){ if($m==$num-1){ echo '0.00%'; } else { echo '0.00%,'; } $m++; } ?>"> <FRAME SRC="topbar.php?<? echo session_id() ?>" NAME=TOPBAR NORESIZE> <FRAME SRC="overview.php?<? echo session_id() ?>" NAME=MAIN FRAMEBORDER=NO BORDERCOLOR='#000033'> <? $i=0; while ($i < $num){ $id=mysql_result($result,$i,"id"); ?> <FRAME SRC='BuildFindzs.php?id=<? echo $id ?>' NAME=BUILDFIN<? echo $id ?> FRAMEBORDER=NO BORDERCOLOR='#000033' NORESIZE> <? $i++; } ?> </FRAMESET>   </FRAMESET> [/code] So yeah, how do you hide them? And I dont want them disabled, they need to work themselves in those isolated frames >_>
  11. [quote author=onlyican link=topic=102862.msg408856#msg408856 date=1154611890] try try $BannedBy != $Username &&... (Without the single quotes round Username) [/quote] That solved it =] Thanks a lot =D
  12. Ok, I have set an If statement on my website so users with the status "Game Moderator" can't unban users banned by another Staff member. This is the script: [code=php:0]$query="SELECT * FROM Users WHERE Username='$Unbantarget'"; $result=mysql_query($query); $Status2=mysql_result($result,$i,"Status"); $BannedBy=mysql_result($result,$i,"BannedBy"); $query="SELECT * FROM Banned WHERE Username='$Unbantarget'"; $result=mysql_query($query); $num=mysql_numrows($result); if($BannedBy!='$Username' && $Status=='Game Moderator'){ echo "<span style=color:red>".$Username.", You cannot unban a user you did not ban!<br> Contact the Game Moderator (".$BannedBy.") of the User."; } else { if($Status2=='Banned'){ $query="UPDATE Users SET Status='User', BannedBy='', BannedOn='', BannedUntil='', BannedFor='' WHERE Username='$Unbanvictim'"; mysql_query($query); $query="UPDATE Banned SET BannedFor='$Condition' WHERE Username='$Unbanvictim' && BanTime='$num'"; mysql_query($query); echo "User ".$Unbantarget." has been successfully unbanned!"; } else { echo "Typo error? Stupidity? Either way, the user isnt banned"; } }[/code] However, when I debugged this by trying to unban a user I had banned, it came up with the message "Test, You cannot unban a user you did not ban! Contact the Game Moderator (Test) of the User." What's going on? o.O
  13. Ok, sounds like it will work, just two questions: - If the user shutdown his computer, will the countdown until execution still occur on the server? - How would you get it to work so even if you logged onto another computer, then the countdown would still be going?
×
×
  • 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.