Jump to content

berry05

Members
  • Posts

    204
  • Joined

  • Last visited

    Never

About berry05

  • Birthday 04/13/1992

Contact Methods

  • AIM
    tylerbe992
  • MSN
    tylerbe992@hotmail.com

Profile Information

  • Gender
    Male

berry05's Achievements

Member

Member (2/5)

0

Reputation

  1. Is it that MX is older than cs4 or are they two completely different programs that do entirely different things?
  2. sorry I've been gone for awhile ....no i haven't been on other php forum sites!!! I've just been caught up doing other things...you people that now me might be like o god here comes the questions again, but no, i am here to not ask questions but to learn and look for answers before i ask xD Well anyways besides that... I am back again because this site is obviously #1 !! xD
  3. erghh i got something like that... BETA GAME <form action="<?=$_SERVER["PHP_SELF"]?>" method="get"> <input type="submit" value="start" name="start" /> <?php session_start(); $health = $_SESSION['health']; $gold = $_SESSION['gold']; $seeds = $_SESSION['seeds']; if ($_GET["start"]) echo $health; ?>
  4. Hello, Is there a way I can start a game and stay on the same page which would be index.php by using the GET function? I wanted the player to click the start button then the page has all the users stats ...this game is only going to be by session so there will be no logging in necessary. Thank You!
  5. I'm sorry but i wanted to post this in the PHP section, no AJAX is included...if someone could move this thread that would be great!
  6. I have check boxes next to each item when I call up the items from mySQL . How do i make the item disappear in the mySQL database when i user ticks the box and clicks "sell item"? I've been having trouble on that .. <html> <body> <p><a href="index2.php">Index</a> | <a href="shop.php">Shop</a> | <a href="sell.php">Sell</a> | <a href="logout.php">Logout</a> </p> </p> <?php session_start(); $checked = $_POST['checked']; if(isset($_SESSION['otherusername'])){ $db=mysql_connect('localhost', 'root', ''); $res=mysql_select_db('txtgame',$db) or die(mysql_error()); $otherusername = $_SESSION['otherusername']; //"SELECT item FROM users_items WHERE username='".$Username."'"; $res=mysql_query($otherusername)or die(mysql_error()); while($row = mysql_fetch_assoc($res)){ echo ' <input type="checkbox" name="item[]" value="items" />'. ' '.$row['item']."<BR />"; } }else{ echo "Sorry your not a member please join us!"; } ?> <br><input type="submit" value="sellitem"> </form> </body> </html> Thanks !
  7. how do i add a check box to a field that has been called onto the browser...i want to have a check box after each item that has been called but I've been looking around and cannot find anything on it ... Here's the code... <html> <body> <p><a href="index2.php">Index</a> | <a href="shop.php">Shop</a> | <a href="sell.php">Sell</a> | <a href="logout.php">Logout</a> </p> </p> <?php session_start(); if(isset($_SESSION['otherusername'])){ $db=mysql_connect('localhost', 'root', ''); $res=mysql_select_db('txtgame',$db) or die(mysql_error()); $otherusername = $_SESSION['otherusername']; //"SELECT item FROM users_items WHERE username='".$Username."'"; $res=mysql_query($otherusername)or die(mysql_error()); while($row = mysql_fetch_assoc($res)){ echo ' '.$row['item']."<BR />"; } }else{ echo "Sorry your not a member please join us!"; } ?> <br><input type="submit" value="sellitem"> </form> </body> </html> Thanks !
  8. LOL I need to learn PHP waaay better than what I know now..aha
  9. im learning! aha i figured it out by using arrays! now i dont need to use the database.. here's the simple code.. <?php $problems = array ( "1+1=", "1+2=", "1+3=" ); $random = $problems[array_rand($problems)]; echo $random; ?>
  10. now i get this array(1) { ["problems"]=> string(4) "1+1=" }
  11. now it shows the two checkbox's but doesn't show the items name next to it >_>
  12. I have 3 math problems in my table...I want to show a random math problem when i run the script...just 1 out of the 3... btw thanks for helping me out man!
  13. lol...sry if i didnt explain this good enough..ok..so there's a query that shows the fields of a table and shows all the items that user thats logged in has...once it showed up there's a checkbox to each item..if a user wants to sell that item he checks it off and clicks sell....once he clicks sell it echoes saying you've sold "whatever item"! and then i can take care of the rest like updating the database to the users gold and stuff..i can do that part....
×
×
  • 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.