Jump to content

Pikachu2000

Staff Alumni
  • Posts

    11,377
  • Joined

  • Last visited

  • Days Won

    11

Everything posted by Pikachu2000

  1. That's the exact opposite of what you said you wanted to do, and is how it should have been to begin with: i would like it to query 6, 7, 8, 9, 10. How about explaining exactly what you're trying to accomplish.
  2. You really should be developing locally. It would save you a ton of time not having to FTP files every time you make a change and need to test it. In the meantime, then first lines in that file after the opening php tag should be: error_reporting(-1); ini_set('display_errors', 'On'); You also need to remove the line you said in a previous post that you added to the php.ini file. The syntax is incorrect.
  3. Then you need to ORDER BY score ASCending instead of DESCending . . .
  4. $user = $_SESSION['username']; $result = mysql_query($sql) or die(mysql_error()); <---- Why is this here? $sql isn't defined until several lines later, so of course the query is empty. if ($_POST['submit']) { $_POST['message'] = mysql_real_escape_string(htmlentities($_POST['message'])); $sql = "INSERT INTO chat (user, message) VALUES ('$user', '$_POST[message]')"; $result = mysql_query($sql) or die(); See my comment in the code.
  5. Go change your database password on the server right now, since you just posted it on the internet.
  6. Notice which line the error is on, then look at which line your connection to the database is on. Something seem backwards?
  7. You shouldn't be using a URL with include/require anyhow. You should be using a filesystem path.
  8. It's human nature to stick with methods one knows best, and is most comfortable with.
  9. I'm guessing the reason is that the old fashioned method is older.
  10. Either with the MySQL function SUBSTRING(), or with the PHP function substr.
  11. The point is, if you aren't getting that error, then something is wrong. There is no such function, unless you've created it yourself. And I don't see anything in the code showing that you have done that. Do you even have error reporting turned on?
  12. I don't understand how you aren't getting Fatal error: Call to undefined function ctype_alphanum().
  13. Go read the manual again. If you don't understand it, there are plenty of examples in it you can try on your own.
  14. Read this: http://php.net/manual/en/language.types.string.php
  15. Do it the same way, except make the image the link instead of the text.
  16. Start echoing things until you find out where a value changes to something other than what you'd expect it to be.
  17. It is most assuredly an array. Post the form html, and the code that processes it.
  18. If it says 'Array', then what makes you think it's anything other than an array?
  19. You can't directly echo an array. You need to loop over it with foreach and echo each element in the loop.
  20. I don't see anything wrong with it as it is. The first 3 posts are about using a variable in an external file, then it continues right into how to properly include that file. At its root, it's all related to the same problem, no?
  21. And precisely what steps have you taken to debug this issue on your own?
×
×
  • 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.