Jump to content

mikesta707

Staff Alumni
  • Posts

    2,965
  • Joined

  • Last visited

Everything posted by mikesta707

  1. Instead of using the visibility style, you could use the display style. If you set it to none, then it won't take up any of the space it usually does
  2. I'm assuming you used something like PHP's time() function, or mysql's now() function. Those give whats called a Unix Timestamp, which is the number of seconds that have elapsed since some date in 1970 (I forget the exact date.) This number seems kind of useless, but can be extremely useful. you can use date()'s optional second parameter to format the timestamp to whatever date format you want. You can use that to determine how much time is between two time stamps, etc. etc.
  3. What does the "protect()" function do? can you post it?
  4. look into GET/POST. You want to send a unique identifier (like the primary key. usually set to auto increment) via get/post to the page you create, and use the unique ID to get the row you want to edit from the table Basically what emo said, but you need to send some information to the page
  5. to debug, put something like or trigger_error(mysql_error()); after your mysql_query() calls and see if you are generating a mysql error. Also turn error reporting on via error_reporting(E_ALL); ini_set("display_errors", 1); report if you get any errors
  6. can you post the code?
  7. or you could just put it above the root directory and access it from there
  8. The final result will be 5, and the loop will display whatever you have in its block 5 times
  9. There are many database classes already made if thats what you are after. Just do a google search for a php database class. As far as a generator, I don't know if they exist, and a generator that just makes 1 class seems kind of pointless to make anyways.
  10. oh... you don't have a text area... yeah thats the problem, make it a text area. normal text input boxes don't have new lines (because all the text is on one line)
  11. where do you copy it from? Word or something? I'm guessing that the text itself doesn't have new line characters, and thats why the nl2br() function won't work. You can insert <br /> tags or better yet, <p> tags into the textarea manually, but I don't see a way for php to guess where your paragraphs ends/begins and insert a tag there
  12. I usually get at least 3-5 kill streaks, sometimes I can get a chopper or two. I play a lot of free for all though, so I usually get shot in the back right before a kill streak reward. The funny thing is that 70% of the players in FFA are campers, and most of them suck at it anyway
  13. well the error says that the second argument is the wrong data type, so what does $disallowedPhones have in it?
  14. a randomly generated number? $num = rand(0,10); ... Do you even use google?
  15. if $_SESSION['rofl'] is in seconds than it will work... what does $_SESSION['rofl'] have in it
  16. if ($_SESSION['rofl'] < 5) ?...
  17. well since you send it via get, you can make a link, (which would go to whateverpage.php (this is your action attribyte) and at the end of that you put ?style=$watever) not to hard to change the code you have with images. just change the option tags to <a> tags wrapped around img tags
  18. Yes this is the wrong section, as this is a javascript problem, but you are probably looking for something along the lines of window.close(); look it up on google. Although, I think if you try to close the main browsing window, it will throw a message. Why do you want to close the browser anyways?
  19. Been reading about this fight on slashdot for a while. glad it finally got resolved
  20. If you want to handle your error's elegantly, I would advise against using the "or die" First of all, you DONT want to show your errors to your users. You want to catch errors (either with exceptions, or clever if statements, or combinations of those) and show a general error message ("Like oops something happened, try to reload"), and right the actual errors to an error log.
  21. Do you have a php server? like apache? You can't just run PHP in a browser like javascript/html.
  22. Error handling can be done in tons of places. Any where your script can go wrong is a place for error handling. you especially want to handle errors from user input elegantly, so I would start there
  23. I don't really understand what you mean by temp story error messages? Common practice is to store them in an array like so $error = array(); if (some error){ $error[] = "Some error message"; } //so on
  24. can you post the whole form?
  25. ... firstly how are we supposed to know but yeah, you probably want to define the variables $server, $user, $pw, and $db as I don't see them defined anywhere, and that header.php has "db info" in it. Beyond that, I can't help A word of advice though.. I would learn PHP before you try to copy pasta scripts from the internet and make them work.
×
×
  • 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.