Jump to content

trq

Staff Alumni
  • Posts

    30,999
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by trq

  1. trq

    Ajax Form

    Did you bother to read the rest of the answer?
  2. Now, how can date be two different values at the same time?
  3. Read your query. How can datum equal two different values at the same time?
  4. What debugging have you attempted?
  5. What does accessing a htm file have to do with the installation or configuration of php?
  6. This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=338588.0
  7. Move the echo out of the loop. ps: There is no function defined anywhere in that code.
  8. trq

    Ajax Form

    You want the page to change appearance after the form has been submitted? Is that your question? The easiest way is to not bother using Ajax, done. If you still want to use Ajax you will need to (once the form has been submitted) remove the form from the DOM and replace it with whatever you want.
  9. If you've already separated your controllers and view you really should look into separating your database logic into models. Having the database logic in the controller like that means you cannot reuse it outside of your controller. Nor can you share database logic between controllers.
  10. That is because the majority of PHP developers use Linux / Apache hosting.
  11. mysql uses -- to delimit a comment. $query = "SELECT $select -- from FROM dbPosts -- left join LEFT JOIN dbUsers ON dbPosts.username_id = dbUsers.id -- left LEFT JOIN dbFriends ON (dbPosts.username_id = dbFriends.my_id)";
  12. This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=338492.0
  13. You don't have to do anything, and the code you have for killing a session after a certain time isn't needed either. This is all taken care of under the hood. Check out the session directives within your php.ini for more details.
  14. This topic has been moved to Other. http://www.phpfreaks.com/forums/index.php?topic=338403.0
  15. It's a file, not a directory. And yeah, as noted, it needs to be edited using sudoedit.
  16. Even without the error suppression, there was no code in your example that would cause an error. Using error suppression would just slow down the process.
  17. Executing the sudo command in php is the easy part, configuring sudo is where it gets complicated. Sudo allows you to let specific users and/or group execute specific commands as the root user. This is all configurable within the /etc/sudoers file which should only be edited via sudoedit. This has nothing at all to do with php.
  18. There are plenty of tutorials around. We don't really need to write another. Go have a look, if you get stuck, come back and ask a more specific question.
  19. Just a note on teynon's code. There really is no need for all the error suppressors.
  20. It's not the only problem, but it is where I would suggest you start. Another, for instance is that fact that you don't bother checking your queries execute successfully or return any results before going ahead and using those results. But yeah, it is of course going to take longer, use more resources and be less efficient to execute multiple queries.
  21. I would start by looking at some tutorials on sql's JOIN syntax. You have far to many queries.
  22. Hi freelance84, Some nice suggestions there, some of which I have often thought about myself though I don't really use the WYSIWYG editor. I simply copy what I need and past them between tags. Anyway, generally we like to keep mods to the boards pretty slim for easier maintenance. If we can find a mod that's easy enough to install / patch into the system it might be worth discussing further. I'll see what we can find.
×
×
  • 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.