Jump to content

revraz

Members
  • Posts

    6,911
  • Joined

  • Last visited

    Never

Everything posted by revraz

  1. So the file path is one folder below your script path?
  2. what is *** ?
  3. Mark as solved please
  4. Or you can echo the $query to see if it's populated... or not..
  5. echo $query after the update line and see how it looks
  6. The actual error would be helpful.
  7. Means your query is failing. mysql_error is good to use to find query errors $query = "SELECT title, content, FROM members WHERE id = '1'"; Remove the comma after content
  8. That error indicates your query failed. Use mysql_error after the query to see why and also echo your query to see what is being passed.
  9. Missing semi colon $row = mysql_fetch_array($result)
  10. So what is the actual problem?
  11. The query looks fine. Put a die or exit after the echo so the code stops and you can see the value. And you want to use echo $sql; without single quotes. Single quotes prints the variable name, not it's contents.
  12. He is using mysqli Did you echo $sql to make sure you are getting a result?
  13. Namespaces are a .net concept. With that said, I guess you could use includes to try and get the same result.
  14. revraz

    Question

    Just do a IF statement and check it how you want it to display. If you can say it in a post, then you can transpose it into code.
  15. It is designed to sanitize data going into the database.
  16. Test to see if your connection is sucessful this way as well as your query error: <?php $link = mysqli_connect("localhost", "my_user", "my_password", "world"); /* check connection */ if (mysqli_connect_errno()) { printf("Connect failed: %s\n", mysqli_connect_error()); exit(); } if (!mysqli_query($link, "SET a=1")) { printf("Errormessage: %s\n", mysqli_error($link)); } /* close connection */ mysqli_close($link); ?>
  17. Remove the "or die (mysqli_error()) here $dbc = mysqli_connect('localhost', '111', '111', '111') or die(mysqli_error()); See if that works.
  18. How I would approach this is load each sentance into an array, then as you echo out each array element, you can use the HTML List to display it.
  19. I think he just wants the webpage to have access to the DB using the id/pw that is already setup for DB access. So basically yes, you just need the proper connect string to allow the webpage to write to your database. But without seeing your other code, no one can tell you if what you posted above will work or not as it is.
  20. I think what you will have to do is create a loop for this if you want it at the start. Your current code starts replacing at the period, so you are already at the end of the sentance.
  21. Key is probably a MYSQL reserved word, try changing the field name or use `key`.
  22. Are you using mysql_error after the query to see if any errors are being reported? Also, for some reason, I can't see your first query, the box is empty for me. Echo $qry and see what it looks like.
  23. NP, if resolved mark as solved please.
×
×
  • 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.