Preventing Multiple Submits

The problem of multiple form submissions is quite common in PHP. Many people use forms for database interactions and emailing etc, but when the form is submitted, the page can be refreshed and the POST data, or file uploads is POSTed once again. This tutorial brings an easy remedy to the issue with the use of form tokens and sessions.
By setting a form token within a hidden field in the HTML form, the value can be checked in the page the form data is submitted to. The form token itself is simply a randomly generated string which is added to the form and stored in a session also. In this example the PHP function uniqid() is used to generate the form token value.
The PHP part of the form.php page will look like this. Continue reading “Preventing Multiple Submits”

MySQL Scheduler

From the release of MySQL 5.1.6 comes the inclusion of a scheduler. The scheduler, as the name suggests, schedules tasks within the database in the same way as triggers. In fact, the scheduler is just that, a temporal trigger. Many of the tasks assigned to the scheduler have been run from cron, but not everybody has access to cron or the windows task scheduler. The MySQL scheduler is not a replacement for these tools as some tasks with PHP scripts need to employ other, non database, events.
Getting Started Continue reading “MySQL Scheduler”

Model View Controller MVC

  • http://www.phpro.org/tutorials/Model-View-Controller-MVC.html
  • http://php-html.net/tutorials/model-view-controller-in-php/
  • http://anantgarg.com/2009/03/13/write-your-own-php-mvc-framework-part-1/
  • http://www.sitepoint.com/forums/showthread.php?t=575427
  • http://www.henriquebarroso.com/how-to-create-a-simple-mvc-framework-in-php/
  • http://php-html.net/tutorials/model-view-controller-in-php/

Someone’s spamming with my return address, will you blacklist me?

No.

The From field in most spam is forged and meaningless. Some spamware uses addresses from the spammer’s “To” list to also fill in the “From” address. Usually that is just a random selection, but occasionally spammers “bounce bomb” a particular recipient with thousands of forged return-paths forged in the victim’s name, either out of revenge or simply because their ratware is shoddy and the random rotation fails. Continue reading “Someone’s spamming with my return address, will you blacklist me?”