Jump to content

Maq

Administrators
  • Posts

    9,363
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Maq

  1. I am 13 years old - money is something i dont have Information and tutorials are free, and I'm sure you'll have no problem finding some. You answered your own question. They ask for "help", you have shown no sign of attempt and therefore implying that you want someone to do it for you. If you want help, then I gave you appropriate help that is proportional to the question you asked.
  2. Could you explain exactly it is your see, then exactly it is you want to see and where? I'm a little confused as to what's exactly supposed to happen.
  3. This should answer most of your questions. http://www.phpfreaks.com/tutorial/php-security
  4. echo"nerver) . " / " . number_format($player->maxnerve) . " [" . $nervepercent . "]' height='19'>\n";
  5. Perhaps [man]mod_rewrite()[/man]? http://www.phpfreaks.com/forums/index.php/board,50.0.html
  6. Sounds like you're on the right track and if you provided some code we could tell you what you need to modify. Something like: $sql = "SELECT * FROM `aircraft`WHERE client_id = 100"; $result = mysql_query($sql) or die(mysql_error()); while($row = msyql_fetch_assoc($result)) { echo $row['row1'] . " " . $row['row2'] . " " . $row['row3']; }
  7. I was testing it. Just replace it with your original variable.
  8. Try this, is that division sign really supposed to divide these two numbers for the title? echo"maxnerve) . " [" . $nervepercent . "] height='19'>\n";
  9. When they log in, store their ID/username (if unique) in the session. When they go to view their profile look up their information by the id or username: session_start(); $id = mysql_real_escape_string($_SESSION['id']); //connection info $sql = "SELECT * FROM users WHERE userid = $id"; $result = mysql_query($sql) or die(mysql_error()); $row = mysql_fetch_assoc($result) echo "User " . $_SESSION['id'] . " account balance: " . $row['AccountBalance']; ?> Clearly state?? OK, as clear as it can be with the lack of information you provided, you need to change it to work with your script... Good luck!
  10. If you just want to display the table in descending order by id do something like: SELECT * FROM table ORDER BY id DESC
  11. First, always use <?php, never short-tags, it minimizes portability. Second, I fail to see where you try to use this file. You're using: $db = mysql_connect($hostname, $db_user, $db_password); mysql_select_db($database,$db); in which all these variables are undefined, not to mention that your include file is below the code that needs to use it.
  12. Are you referring to actually ALTERing the MySQL table? Which is a bad idea, and most likely due to poor design. Or display it in the order you described, which I like to call, reverse, or DESCending.
  13. You have a couple problems. 1) Your submit button doesn't have a name. 2) You're calling the functions to do the actual work when: if ($_POST['process'] === '1') which never happens. Try this, replace all of this: if ($_POST['process'] === '1') { print "Process = 1"; connect_db(); write_user_data(); } else { print "Process = 0"; } with: if(isset($_POST['submit'])) { print "Process = 1"; connect_db(); write_user_data(); } And replace: with this: Now when the user clicks "Go!", which is the same as isset($_POST['submit']), it will call all of your functions that process your information.
  14. Hmmm, don't see that in your script anywhere, unless I overlooked it. At least it works.
  15. Here's an example for passing variables to the same page and changing the query. You can substitute your link in for the $_SERVER['PHP_SELF'], this means that it's passing it to the current URL. You should also call [man]mysql_real_escape_string()[/man] on your values if they're involved in the query, to prevent SQL injection. $start = 0; $limit = 5; $common = isset($_GET['common']) ? $_GET['common'] : 1; $example = isset($_GET['example']) ? $_GET['example'] : 1; $sql = "SELECT id, img, name, level, speed, cost, type, avb FROM $tbl_name WHERE class='$example' AND type='$common' ORDER BY level LIMIT $start, $limit"; echo "Query=> " . $sql; echo " example 123 common 456"; echo " example abc common efg";
  16. Yes you would need to use COUNT and GROUP BY.
  17. More, like, "As long as you keep your mouth shut, it looks good".
  18. Use single quotes for the attributes: echo "Go!";
  19. Hahaha, I don't about the spare change... but everything else is worth it!
  20. Sounds similar to subversion. There may be a client that has similar features you desire. http://subversion.tigris.org/ These are open source, so you can get some ideas on how to go about designing and creating certain features. But to answer your question, yes it's very feasible to accomplish this type of application with the listed languages, and in fact some of the clients are codes in those.
  21. Now that's just sick...
  22. You're going to want to look into Database Normalization. If you want to make additional categories, features, classifications, etc. then it's much easier with a normalized database.
  23. if(isset($row_rs_cats['sub']) && trim($row_rs_cats['sub']) != '') {
  24. Looks like you already have a check for this var being empty: if ($row_rs_cats['sub'] == '') // If subcategory is not empty //
  25. Try: if (empty(trim($row_rs_cats['sub']))) { // No subcategory exists //
×
×
  • 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.