Jump to content

vicodin

Members
  • Posts

    279
  • Joined

  • Last visited

    Never

Posts posted by vicodin

  1. You can try using Javascripts unload() to tell when a user closes the browser. As part of your sign out you can have it clear any locked entires of that user in the DB. You can use AJAX to check for abrupt shutdown by having it run a php script every minute or two to update the database that the user is still in there and if the max time has passed since AJAX has reported back then unlock it.

  2. You don't have to put it in the constructor. you can put it anywhere you want to. For example lets say this form is emailing someone with the info that was provided by the user. You could do it in the constructor and catch the empty field there but as long as you do it anytime before sending the email your fine.

  3. If this is going to be a big project with multiple people working on it then you should def use OOP... Over all I find OOP to be a little more work in the end but the organization it brings is work every bit of the extra work.  Another great feature of it is so you don't need to make a whole new separate function for just a little change on a current function you already have.

  4. The reason for that is probably because slideshows arent made in PHP 99% of the time. In order to do a slide show you will need either flash or Javascript or AJAX. You could use php to get the info from MYSQL but thats all its good for.

  5. When you set the document root in apache of where the site is then it will be able to go through sub directories of the document root but nothing before that. The only problem i could see is it you allow the PHP script to use the command exec(); then its like the php script is accessing the terminal.

  6. Do you have IIS installed on there? If not then you need to install that. If you have it installed then google how to install php in IIS. If you have that done then you cant just double click a php file and have it open in a browser and run. It needs to be parsed through the server first. So what you need to do is go into iis find your php file which should be in your web root and right click it and hit browse. When you hit browse it opens it in a web browser and sends i through the server. If you dont want to go through all of that then you need to get an IDE like Zend and use that to run your php files.

  7. Ok so i have a IIS server running with php installed. I also have a my SQL server on the same machine as IIS. BTW the server is crap but it's only a dev. server. So I am sending a MYSQL query that is checking against 65,000 MYSQL entries and it can never finish. I get a Sever 500 error from IIS. It goes about 45 seconds and then dies with the 500 Error. I changed my php timeout to like 300 seconds but is there anything else in PHP or in IIS i can change so it doesn't give me this 500 error? Thank you for the help!

  8. I have 2 tables. They both have the same column names. What im looking to do is compare one table to the other. So I have a column in both tables that have zip codes in them and in another column there is a rate. I need a statement that compares the rates on both tables and then outputs the column info that has the lower rate. Any help would be greatly appreciated! Thank you!

  9. This should do it.

     

    $query = $db->execute("select `msg`, `status` from `user_log` where `status` = 'read' AND `status` = 'unread' AND `player_id`=? order by `status` desc", array($player->id));

  10. The best security tip i can give you is to never let any user inputted information to go unvalidated. With any user submitted information always use strip_tags() or htmlentities() and for inputting in a database always use mysql_real_escape_string(). User inputted information is the biggest security hole in php there is.

     

×
×
  • 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.