Jump to content

Tagg

Members
  • Posts

    10
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Tagg's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. It used to be, but over the years it has gotten faster [than mt_rand()]. But it still is more random like you said.
  2. Yeah, that thing reminds me of telnet trying to setup lol..bah. But it works perfect now, having a php script carry the code they put into the database and when profiles are pulled up it brings it up. Just a few resizing obstacles left so it doesn't flip the layout around lol. Thanks again, and I tried that FCKeditor one but dunno - think tinymce is easier to setup and more flexible from what I saw. Would recommend it to anyone else looking for something like this.
  3. I searched through a few pages of results on here and Google'd around; I have a profile members can edit, you know..information, email, password, etc. One of the things is a description/biography table..but the only thing I have that you can put in there is basically text lol. I have seen profiles where they have made it able to like insert/show (embed) youtube videos, and post pictures, even simple bold/italic abilities (once I saw a toolbar but that would crowd my theme to be honest). Is there a name for these types of features? I'd appreciate if anyone could pass on a name/link about it! Wanted to snazzy up my profiles with a little weekly project
  4. Thanks, the 2-3 pages that were acting up like this were written by someone else and enabling short tags fixed those! - To be honest I never knew you could short-hand write those tags like that till I started digging into this problem tonight heh Not that it saves a lot of time compared to the hassle it can bring. Thanks for the help again
  5. I just switched to WAMP..a lot easier setting up than Apache and its components heh. But I am having a problem with normal php code still displaying on the pages. From my night of 'googling' I have found out only that it is code that isn't in use and just loads up for fun? I managed to turn it off in PHP Settings for the main site (I don't even remember how, just trial & error on the first option I tried lol) - but for my lil admin management page the php code will still pop up everywhere. It is not really any errors, just code in like 'else, if else, etc' statements that seem to want to join the party too uninvited. :| I'm guessing there is some setting you are supposed to change...I will keep googling and trying out these different modes but if someone already went through this before and can guide I would really appreciate it (If my question is confusing..let me know and I will host a small snapshot of what I mean)
  6. Currently I am working on updating a new profile layout. On the old one you would have to put in their ID followed by the message. I know this is annoying to do for users so I wish to make it automatically insert the ID, which doesn't seem to be working for me (tried using $_GET[iD] as value= to call it). else { print "<form action='writepm.php' method='post'>"; print "ID of recipient:<br>"; print "<input type='text' name='nameID' size='5' value=$_GET[iD]><br>"; print "Subject:<br>"; print "<input name='subject' type='text' size='30'><br>"; print "Message:<br>"; print "<textarea name='message' rows='5' cols='40'></textarea><br><br>"; print "<input type='submit' name='submit' value='sen The code for 'nameID' is $nameID=$_POST['nameID']; $suser="SELECT * from km_users where ID='$nameID'"; $suser2=mysql_query($suser) or die("Could not get user"); $suser3=mysql_fetch_array($suser2); Code used to send it once it passes the if else statements verifying if there is an ID/Subject/Msg { $subject=$_POST['subject']; $message=$_POST['message']; $date=date("U"); $sendmessage="INSERT into km_pms (sender, receiver,subject,message,therealtime) values('$userstats3[iD]','$nameID','$subject','$message','$date')"; mysql_query($sendmessage) or die("Could not send message"); print "PM Sent, please go back to <A href='pm.php'>PM Main</a>."; } I based this off the other things that can be done straight from the new profile (like view stats) which would bring up their page. But the calling of the user ID has caught me off guard which doesn't seem to work the same way I reckon?
  7. Thanks, I was trying some variations and tutorials I was reading through..kind of got mushed in there. Would you know of a good way to call certain values out of the database? I can apply what I need on a php page, but I guess it's useless without a Session selecting what you need..if that makes any sense heh. I'l be on google searching, if its not possible to do this or an alternative way is possible please let me know..you guys rock
  8. I have been getting a few crons up for a game I have been working on. On my latest one I tried something a little above my skill level and need some help now. The way it is suppose to work is there is a database for the users called km_users, where one of the rows is a clan they can join. After they join/create one in the game it sets the name of the clan in that row. Then there is a clan table, km_clan, in that same database (its called a table right?), where I have a row for 'troop power'..which is where I have my problem. I am trying to have a cron update that row regularly by taking all the users from the km_users table with the specific clan name/id and add in all their troops. Btw, there is 2 rows on km_users called 'offarmy' and 'dffarmy'. So basically if 3 users are in the table, and 2 of them are in Clan A - Then the row in km_clan with trooppower would add the 2 users 'offarmy' and 'dffarmy' together and keep the third user to his own clan stats if they are in one. Here is my code, it will update the trooppower row but it posts the same number under each cartel... <?php include "/home/vfelixxv/public_html/ext/connect.php"; if (isset($_SESSION['player'])) { $player=$_SESSION['player']; if(isset($_GET['clan'])) { $userstats="SELECT * from km_users where playername='$player'"; $userstats2=mysql_query($userstats) or die("Could not get user stats"); $userstats3=mysql_fetch_array($userstats2); $getclanstats="SELECT * from km_users where clanname='$userstats3[clanname]'"; $getclanstats2=mysql_query($getclanstats) or die("Could not query stats"); while($getclanstats3=mysql_fetch_array($getclanstats2)) { $skill += $getclanstats3[offarmy]; $atkskill += $getclanstats3[dffarmy]; } $gettrooppower="Update km_clans set trooppower=$skill+$atkskill where name=$clan[name]"; $gettrooppower2=mysql_query($gettrooppower) or die("Could not run trooppower"); } } ?>
  9. Quick and simple, I have this form; print "Player ID to Attack<br>"; print "<form action='newatk.php' method='post'>"; print "<input type='text' name='playerID' size='20'><br>"; print "<P><input type='submit' name='submit2' value='Attack'></form>"; When they put in a value into the 3rd row - it sends it to a php file called newatk.php where I have it call " name='playerID' " which = player 2. Also the player you will fight. Playerone (which would be you), is selected from the session cookie to define the id and that I can handle easily. This code works and all very good, the only problem I have is when I attempt to put in inside a link (under this snippet of code) $playerID=$_POST['playerID']; $playerone="SELECT * from km_users where playername='$player'"; $playerone2=mysql_query($playerone) or die("Blah"); $playerone3=mysql_fetch_array($playerone2); $playertwo="SELECT * from km_users where ID='$playerID'"; $playertwo2=mysql_query($playertwo) or die("Blah"); $playertwo3=mysql_fetch_array($playertwo2); $time=date("M d H:i:s"); Alright, what I'm attempting to do is set it up to have an attack linkinstead of a form submit button.. (basically think of it as a message link on a forum where you want to message them) ..on the user's profile so when clicked it would take their ID and your ID and would go to "newatk.php" and activate the fight/math to determine what happens (which that is all fine) like it does in the form. http://ext.flitched.com/ I honestly don't know how well to explain it without taking too much time of your time reading this, if you go to that site and login with guest - guest, you can easily see how it works and in the "top players" on the left side navigation...look for the link called "hit" and look at where the link is supposed to go. I have it set to: "<a href=newatk.php?name=4>$dead</a>" And I know it is supposed to have a $_GET command right there right? I did a lot of tutorials but just can't seem to pinpoint how to set it up. I'm not asking to get spoonfed - just a nudge where I can learn how to do it! I'l gladly show any more code that is needed, but I believe that I posted enough to pinpoint it especially after you visit the site, there is like 5 things on there lol..easy to find. Thanks for your time! (If you have a good tutorial for this stuff I'd love to read up, I saw one similar to this earlier on the forum but I just really couldn't find my problem)
×
×
  • 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.