January 2013

Here is how to use mySQLi, connect to the db and display a single record from database.

{ 0 comments }

Here is how to use mySQLi, connect to the db and display records in loop.

{ 0 comments }

To maintain security and stability, PHP extensions, features and mySQL have to be updated. Now old mySQL Database Queries will run the same but for the new PHP version they might through an error of deprecated query or something. After sometime deprecated extensions won’t be supported by PHP servers and phpMyAdmin mySQL server. Here are […]

{ 0 comments }

This is not a foolproof system but its handy if users/subscribers are few. If you want to send an email (newsletter email) to all users then you can do like this. Select admin name and admin email from db (not important) Select users from db // Start a loop // Set memory limit and script […]

{ 0 comments }

‘Memory Limit’ and PHP Script ‘Max Execution Time’. Both are limitations set by Server, that force a developer to remain conscious about resources consumption by their scripts – and for a good reason. You do not want your server to get overloaded by running scripts and infinite loops causing low memory available for rest of […]

{ 0 comments }

Previously I have posted PHP email scripts here but here is an update that is working for me now. There is one common problem with the email that is sent by using PHP scripts. That is: Email land in junk or spam folder. Here is the solution with HTML ready email. Send PHP email with […]

{ 0 comments }

It is an essential professional approach to implement all possible necessary checks while programming webapps. If a user is inactive for certain period of time, you can log him out and clear all session data for security check. This check will build user’s trust in your development skill and he will feel secure while using […]

{ 0 comments }

I have been using thumbnail class by ‘Ian Selby’ v1 that can crop image from center and create thumbnail by given width and height parameters but that was not flexible. If the image has same width and height ratio (e.g. 100×100 or 500×500) then it is great to crop and resize image from center and […]

{ 0 comments }

You can change webpage background page everyday. Its a simple PHP code tha takes day value and uses a little CSS style to do that. Here it is.

{ 0 comments }

Uploading images in PHP… I store image name and size (width, height) in DB to retrieve later to use. Here is a script that will enable you to get image width and height in PHP. You can use this script in image upload forms.

{ 0 comments }