Jump to content

trq

Staff Alumni
  • Posts

    30,999
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by trq

  1. Strings need to be surrounded by quotes in sql, integers do not. Complex structures (like arrays) should also be surrounded by {curly braces} when within double quoted strings. $result = mysql_query("UPDATE new_line_test SET data = '{$_POST['datatoenter']}' WHERE ID = 1") Also, you should not place user data directly into your queries as it leads to all sorts of security issues. Run $_POST['datatoenter'] through mysql_real_escape_string first. $data = mysql_real_escape_string($_POST['datatoenter']); $result = mysql_query("UPDATE new_line_test SET data = '$data' WHERE ID = 1")
  2. This is exactly what nl2br was designed to do. New lines are invisible characters. Try it and see.
  3. This topic has been moved to Other Libraries and Frameworks. http://www.phpfreaks.com/forums/index.php?topic=357112.0
  4. You should do your comparisons in your query, not in PHP.
  5. What is the problem? The only part your wrong about is that nl2br doesn't replace newlines with <br /> tags, it simply inserts <br /> tags after newlines.
  6. This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=357109.0
  7. It type casts $comments to an array. ie; Forces $comments to be of type Array. See http://php.net/manual/en/language.types.type-juggling.php#language.types.typecasting
  8. This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=357107.0
  9. We are not here to supply people with code. Do you have an actual question?
  10. We can't help without seeing relevant code.
  11. This topic has been moved to Apache HTTP Server. http://www.phpfreaks.com/forums/index.php?topic=357075.0
  12. Do you meen one MySql account for each site user?
  13. It can't be accessible from outside (private), but you can still use it from within the class.
  14. Start by searching through all the code for the function definition.
  15. trq

    Fatal Error

    Hmmm, I didn't even scroll down that far. Still, I'm amazed you bothered reading the code with the indentation the way it is.
  16. This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=357042.0
  17. trq

    Fatal Error

    So, with that out of the way, where is uploadPhoto() defined?
  18. trq

    Fatal Error

    I think you mean to say are case sensitive. No, I meant what I said. Functions are not case sensitive in PHP.
  19. trq

    Fatal Error

    functions are not case sensitive in php. uploadphoto is not defined.
  20. This topic has been moved to Other Libraries and Frameworks. http://www.phpfreaks.com/forums/index.php?topic=357038.0
  21. As for your issue. You cannot use $this within a static method. This line: $this->db = new database($db_host, $db_name, $db_user, $db_password); belongs within your __construct().
  22. So, a few posts ago I asked you to show us the source. You still haven't. If you ask for help you should read the replies. Also, not that you cannot call session_start after sending out. Turn error_reporting on and you will see your php code produces errors.
  23. You have already posted an example that you said did 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.