Jump to content

trq

Staff Alumni
  • Posts

    30,999
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by trq

  1. Why are you hard coding these id's into your logic?
  2. Do yourself a favor and install virtualbox, from there you can install a Linux distro and have a development environment that is allot closer to any production environments you'll be using.
  3. Sorry but your last reply makes no sense at all.
  4. Your dreaming if you think you can get a web request to execute within a few milliseconds. How long does it take your browser to get the same page?
  5. That won't get you 'who' is logged in. The method denno020 suggested is the typical method used. You simply update a timestamp every time a user hits a page. You then (where you want to display the logged in users) query for all users with a timestamp within the last ten minutes and display them, the rest can be removed (all in this same process).
  6. This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=318895.0
  7. This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=318875.0
  8. What exactly do you want to match?
  9. $_GET is just like any other array.
  10. Firstly, there is no need for all caps in your subject line. Your post is no more important than anyone else's. Your going to need to change the way the link is generated within newssite.php.
  11. This topic has been moved to Installation in Windows. http://www.phpfreaks.com/forums/index.php?topic=318822.0
  12. Do you need to authenticate to use this server? if you do, you'll need to use another means like PHPMailer (google it). If not, just change the smtp settings within your php.ini.
  13. This topic has been moved to Other. http://www.phpfreaks.com/forums/index.php?topic=318815.0
  14. $_GET already is an array. I'm not sure what the rest of your question is.
  15. $u_name & p_word do not exist within the checkEmpty() method. ps: Just because your using classes doe snot mean your code is OOP. This is fare from well designed code. You are creating new Users so you should likely have a User class. The form validation stuff belong on a form validation class, it has nothing to do with creating a new User.
  16. This topic has been moved to PHP Coding Help. http://www.phpfreaks.com/forums/index.php?topic=318804.0
  17. copy.
  18. Besides the issue posted, why on earth are you executing 5 queries when you could be getting all the information you need in 1?
  19. Yes. Some languages call them hashes.
  20. I wouldn't use or die() for anything. There's numerous posts around saying why. The method I suggested is (IMO) the correct way. <?php $username = 'LoserVille'; $password = 'password'; $myQuery = "SELECT account_id FROM user_accounts WHERE username = '$username' AND password = '$password'"; if ($result = mysql_query($myQuery)) { if (mysql_num_rows($result)) { // user exists } else { // no user found } } else { // query failed. trigger_error(mysql_error() . "<br />$myQuery"); } ?>
  21. Firstly the comparison operator is == not = secondly, x is not defined anywhere within your function.
  22. This topic has been moved to Third Party PHP Scripts. http://www.phpfreaks.com/forums/index.php?topic=318780.0
  23. This topic has been moved to PHP Applications. http://www.phpfreaks.com/forums/index.php?topic=318784.0
  24. Neither are particularly good because you never check that the query succeeds before using its result. But yeah, once you do that, you'll want to check the number of rows returned.
×
×
  • 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.