Jump to content

3raser

Members
  • Posts

    815
  • Joined

  • Last visited

Everything posted by 3raser

  1. Not sure if I should have asked this in my other topic :/ But how do I make it so this code: //display data $get = mysql_query("SELECT * FROM items WHERE changeprice > 0 ORDER BY changeprice DESC"); while ($row = mysql_fetch_assoc($get)) { // get data $changeprice = $row[changeprice]; echo '<tr class="row_b"> <td> <img name="object" src="'. $row[imagelink] .'" alt="'. $row[name] .'"> </td> <td> <a href="http://domination.comyr.com/viewitem.php?id='. $row[itemid] .'">'. $row[name] .'</a> </td> <td>'. $row[price] .'</td> <td class="t5"> <span class="rise"> '. $row[changeprice] .' Only echoes out 10 results?
  2. Wait, nvm. I think it's solved now..
  3. Ok, it's partly working now. When I change it to greater than 0, it sends out the ones below zero....and when I change it to smaller....nothing comes out.
  4. Here is my code: <?php //display data $get = mysql_query("SELECT * FROM items ORDER BY changeprice DESC"); while ($row = mysql_fetch_assoc($get)) { // get data $changeprice = $row[changeprice]; if ($changeprice > 0) { } else { echo '<tr class="row_b"> <td> <img name="object" src="'. $row[imagelink] .'" alt="'. $row[name] .'"> </td> <td> <a href="http://domination.comyr.com/viewitem.php?id='. $row[itemid] .'">'. $row[name] .'</a> </td> <td>'. $row[price] .'</td> <td class="t5"> <span class="rise"> '. $row[changeprice] .' </span> </td> </tr>'; } } ?> I'm trying to make it so it only echoes out the price RISES. But when I test it, it still echoes out the ones that are below 0 (-2 is one of them.) Any reasons why?
  5. BUMP....
  6. Bump
  7. That gives me this... Column count doesn't match value count at row 1
  8. <?php mysql_connect("-","-","-") or die("Connection failed!"); mysql_select_db("-") or die("Database fail!"); $username = $_POST['username']; $password = $_POST['password']; if (!$username || !$password) die (" <form action='register.php' method='POST'> <b>Please note that the following characters: `*<>() will be removed upon registering.</b><br /><br /> * Username: <input type='text' name='username' maxlength='12'><br /><br /> * Password: <input type='password' name='password' maxlength='20'></div><br /><br /> <input type='submit' value='Register'> </form>"); if (strlen($password)<=3) { echo "Password must be MORE then 3 characters long! <a href='register.php'> << Back </a>"; } else { if (strlen($username)<=1) { echo "Username must be MORE then 1 characters long! <a href='register.php'> << Back </a>"; } else { $ip = $_SERVER['REMOTE_ADDR']; //protection $before = array('(', ')', '^', '<', '>', '`', '*', '<script>', '</script>', ';DROP TABLE users;', 'users', 'DROP', 'TABLE'); $after = array('', '', '', '', '', '', '', '', '', '', '', '', ''); $output = str_replace($before, $after, $username); //protection $output3 = str_replace($before, $after, $password); //protection $output4 = str_replace($before, $after, $email); //protection $output2 = str_replace($before, $after, $signature); $query = mysql_query("SELECT * FROM users WHERE username='$output'"); $numrows = mysql_num_rows($query); if ($numrows!=0) { echo "This username already exists!"; } else { //write $write = mysql_query("INSERT INTO users VALUES ('', '$output', '$output3')") or die(mysql_error()); echo "<div class='box'>Thank you for registering $output! You can now use your account in the game."; } } } ?> The code, specifically: mysql_query("INSERT INTO users VALUES ('', '$output', '$output3')") or die(mysql_error());
  9. Why do I keep getting this error?... Incorrect integer value: '' for column 'id' at row 1
  10. It works.
  11. I added the code wrong. Let me test it again.
  12. Doesn't work. Just gives me this: The user got a score of :/ Edit: Hold on, I added the code wrong. Let me test it again.
  13. Here is my current PHP & MySQL code: <?php mysql_connect("db4free.net","isrbuckey55","pgpg7755opcd") or die("Connection failed!"); mysql_select_db("isrbuckey55") or die("Database fail!"); //display data $get = mysql_query("SELECT * FROM views"); while ($row = mysql_fetch_assoc($get)) { // get data $time = $row['seconds']; } echo "Total gameplay seconds: ". $time ."<br><Br><br>"; //display data $get = mysql_query("SELECT * FROM scores ORDER BY score DESC"); while ($row = mysql_fetch_assoc($get)) { // get data $score = $row['score']; $username = $row['username']; } echo "The user ". $username ." got a score of ". $score .""; ?> Website link; http://z-o-cheats.webuda.com/ Why does it only display ONE highscore?
  14. Thanks.
  15. How is it possible to get their username also? Like the Highest score and then get the owner's username of that score?
  16. I'm currently working with Visual Basics and PHP. (I'm pretty advanced in PHP) I just want to know after they submit their scores, how do I make it so the database finds the HIGHEST score to display on the website?
  17. Thanks to both of you. I can't believe I forgot the other two brackets!
  18. <?php require ("style.css") ?> <center> <table cellpadding="0" cellspacing="0" id="sharedtable"> <tr class="dblue"> <th colspan="5"><strong>» Message</strong></th> </tr> <tr class="one"> <td class="left">Want to know how much profit you made from your merching? This is the tool for you!</td> </tr> </table> <br /> <table cellpadding="0" cellspacing="0" id="sharedtable"> <tr class="dblue"> <th colspan="5"><strong>» Calculator</strong></th> </tr> <tr class="one"> <td class="left"><form action='index.php' method='POST'>Starting item price <input type='text' name='3' /></td> <td class="left">Ending price <input type='text' name='4' /></td> <td class="left">Money you spent <input type='text' name='1' /></td> <td class="left">Money you got back <input type='text' name='2' /></td> <td class="left"><input type='submit' value='Calculate'></form></td> </tr> </table> <br /> <?php $sprice = $_POST['3']; $eprice = $_POST['4']; $one = $_POST['1']; $two = $_POST['2']; if ($sprice || $eprice || $one || $two) { } else $bamm = $eprice - $sprice; $total = $one - $two; echo '<table cellpadding="0" cellspacing="0" id="sharedtable"> <tr class="dblue"> <th colspan="5"><strong>Calculation</strong></th> </tr> <tr class="one"> <td class="left">Money gained per item: '.$bamm .'</td> <td class="left">Total money earned: '. $total .'</td> </tr> </table> <br />'; ?> Why isn't $bamm showing up? $total shows up correctly, but the other doesn't. Here's the page: http://merchtool.webege.com/index.php
  19. No, it's their damn job. Anyways, leaving this forum. Never really liked the people on it. kongregate.com is awesome!
  20. Flame at me all you want. I'm tired of staff deleting my topics, yes, I may have two, the only reason I did that is because I wanted to edit my old thread and put more information in, but as usual, their is no "Edit" button. And they don't even ask, they just fucking go "yipp-e-d-do". I'm tired of this poor lack of staff. Now ban me, and go against me and flame, I don't care. My opinion isn't changing.
  21. I don't care, all the other sections are in-active. And this is the only booming section. It'll take probably about a week to get a reply. I posted my thread in the morning around 3:00PM, but it's 12:29AM and my thread is still on the top, and NO REPLY!
  22. Why doesn't it update leveltext to the new level? In Macromedia flash 8. //new level if(_root.score > 3) { change.leveltext = "Level: 2" } To the staff: I don't care if this is in the wrong section, all the other sections are in-active. And this is the only booming section. It'll take probably about a week to get a reply. I posted my thread in the morning around 3:00PM, but it's 12:29AM and my thread is still on the top, and NO REPLY!
  23. Why doesn't it update leveltext to the new level? //new level if(_root.score > 3) { change.leveltext = "Level: 2" }
  24. Oh. Ok then NVM.
  25. B-b-b-b-ummp!
×
×
  • 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.