Handling checkbox in a PHP form processor

This tutorial will introduce HTML check boxes and how to deal with them in PHP.

Single check box

Let’s create a simple form with a single check box.

<form action="checkbox-form.php" method="post">

 Do you need wheelchair access?

<input type="checkbox" name="formWheelchair" value="Yes" />

<input type="submit" name="formSubmit" value="Submit" />


25 Google Search Tips

We all love Google. It’s a great place to search and find things that we do not know about. The beauty of Google is its all powerful algorithm that executes billions of search queries. In addition to showing top notch search results, Google’s algorithm has a few interesting features.

We’ll be taking a look at a few tips that can help us tap into the full power of Google.

World Time

World Time

World Time

time cityname
cityname time

Want to know what’s the current local time in a city across the globe? Google can help you. Continue reading

Php page redirection problem

So far i did web development I used javascript redirection. But recently i needed to do that with php. But i got stacked with some annoying problems.
1. Headers are already sent.
2. SESSION variables are not setting.

1. Ok, now here javascript again rescue me see how.

function redirect($url) {
	if(!headers_sent()) {
	        //If headers not sent yet... then do php redirect
	        header('Location: '.$url);
	else {
	        //If headers are sent... do javascript redirect
	        echo '';
	        echo 'window.location.href="'.$url.'";';
	        echo '';
	        echo '';
	        echo '';
	        echo '';

What you need to do just call this method with your desired parameter.

2.-> And now number second! SESSION variables are not setting means you are not getting SESSION variables from redirected page.
The solution is never forget to add “exit;” like a added here.

If you are stilling facing second problem, may you forgot to start session in that page!

A nice script to upload a image and re-sizing them

echo "You have exceeded the size limit";

if($extension=="jpg" || $extension=="jpeg" ){
$uploadedfile = $_FILES['file']['tmp_name'];
$src = imagecreatefromjpeg($uploadedfile);
else if($extension=="png"){
$uploadedfile = $_FILES['file']['tmp_name'];
$src = imagecreatefrompng($uploadedfile);
else {
$src = imagecreatefromgif($uploadedfile);






$filename = "images/small/". $_FILES['file']['name'];
$filename1 = "images/small/". $_FILES['file']['name'];


//If no errors registred, print the success message

// mysql_query("update SQL statement ");
echo "Image Uploaded Successfully!";