Build a contact form in PHP with spam protection (Captcha) from scratch
You are developing a web site or web application and are wondering how you can build a secure contact form for your visitor to contact you from the website easily while controlling spam.
Here, we are going to walk you through the process of building out a contact form from scratch
using PHP with a Captcha to protect the contact form from spam.
Normally, there are many ways to build and validate a form in php:
- you can write code validation of you form in different file than
the file containing the form itself,
- you can write code validation of your form in the same file than
the form. for this tutorials,
we choose to write contact form and code validation in the same file.
So what are we going to build?
- We are going to develop a contact form in which name, email,
message and captcha should be typed prior to the form to be send
to the specified email, subject of the contact information
would not be mandatory to submit the form.
- The email should have a valid email address format.
- Our contact form would look like the contact form below:

With validation's criteria on each field. After having hit the submit
button, the informations of the contact form should be send to
an email address.
So let’s get started by creating our file contact-form.php that
would containt 2 parts:
1- The code to create the form itself like below:
<form method="post" action="contact_us.php" id="contactform">
<label><h2> Contact Form</h2></label><br/><br/>
<label>Name</label><br/>
<input type="text" name="name" placeholder="Type name Here " /><br/>
<label>Email</label><br/>
<input name="email" type="email" placeholder="Type email Here "/> <br/>
<label>Subject</label><br/>
<input type="text" name="subject" placeholder="Type subject Here " /> <br/>
<label>Message</label><br/>
<textarea name="message" rows="20" cols="20" placeholder="Type message Here">
</textarea><br/>
<!--captcha.php is a php file that create a picture in php and show it as .png
and in this form it is used as image source-->
<label>Please type this captcha to avoid spam <img src="captcha.php"><br/>
</label>
<input type="text" name="code" placeholder="Type captcha code Here "> <br/>
<input id="submit" name="submit" type="submit" value="Submit"/>
</form>
|
Explanation of the contain of the form tags above:
-The contact-form page has the .php extension so it can expect and process PHP
code because we decide to include code validation and form in the same file;
-The tag <form> has an ‘action’ attribute which allow to specify the file that’s
going to send the form’s data to ( means the file that would validate de form),
for our case it is the same file contact-form.php which will contain code
to validate form;
-The ‘method’ attribute specify how we want our data to be handled and sent,
we use here the ‘POST’ method because it is more secure than the GET method
(GET will display the data in the URL when data would be send from the
contact form).
-All form fields have a ‘name’ attribute, PHP uses the values from the name
attributes to fetch their data.
-The last fields of the form is an input of type"submit" to allow to send
informations in the form.
Let take this part of the source code above and explain what it would do:
<label>Name</label><br/> <input type="text" name="name"
placeholder="Type name Here " /><br/>
|
This would create a label " Name" and an input of type "text"
where the name would be typed then the attribute placeholder would add
a text "Type name Here " in the text zone like a default text.
The source code would do almost the same for the email, the subject
and the message of the contact form, but for the message it would be a
textarea.
To create the captcha in the form:
- The code's lines below:
<label>Please type this captcha to avoid spam <img src="captcha.php"><br/></label>
<input type="text" name="code" placeholder="Type captcha code Here "> <br/>
|
Would create an < img > tag in the form using as source the contain of another
php file called captcha.php. So to allow the captcha to work in the form above,
we have to create this other php file called captcha.php which would contains
the following code:
Captcha.php
<?php session_start(); // start a session
$image = imagecreate(60, 20); //create //blank image (width, height)
$bgcolor = imagecolorallocate($image, 0, 0, 0); //add black
//background color with RGB to the image created.
$textcolor = imagecolorallocate($image, 255, 255, 255); //add text
//code color with RGB. $code = rand(1000, 9999); //create a random
//number between 1000 and 9999
$_SESSION['code'] = ($code); //add the random number to session 'code'
imagestring($image, 10, 8, 3, $code, $textcolor); //create image
//conataining as image with all the settings above.
header ("Content-type: image/png"); // define image type as .png
imagepng($image); //display image as PNG
?>
|
We have commented the captcha.php file at each line, but what we can
notice here is that this code create a black picture of size 60*20, generate
a random number between 1000 and 9999, and show the image with the
random number generated on the black image.
- The "session_start()" in the beginning of the captchat.php is to allow
us to save the generated random number of the image on the server
and validate it in the form, so the $_SESSION['code'] = ($code) save
the value of the random number into the session so that we can compare
it later with the value that the user would have typed in the captcha
field in the contact form.
2- The code that validate the contain of the contact form:
You can choose to write this validation code before the tag <form>
of your contact form or after it, I choose to do it before the <form> tag,
here is the code:
<?php
/*if submit button is hitting*/
if (isset($_POST['submit']))
{ $error=""; //-----------------------------------------
if (!empty($_POST['name']))
{ $name = $_POST['name']; } else
{ $error .= "You didn't type in your name. <br />"; } //-----------------------------------------
if (!empty($_POST['email']))
{ $email = $_POST['email']; if(!preg_match("/^[_a-z0-9]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$/i",
$email))
{ $error .= "The e-mail address you entered is not valid. <br/>"; } }
else
{ $error .= "You didn't type in an e-mail address. <br />"; } //-----------------------------------------
if (!empty($_POST['subject']))
{ $subject=$_POST['subject']; } else
{ $message.=" you didn't type a subject<br/>";} //-----------------------------------------
if (!empty($_POST['message']))
{ $message = $_POST['message']; } else
{ $error .= "You didn't type in a message. <br />"; } //-----------------------------------------
if(($_POST['code']) == $_SESSION['code'])
{ $code = $_POST['code'];} else
{$error .= "The captcha code you entered does not match. Please try again. <br />";} // test if error is empty mean we have nothing to send else we send the
if (empty($error))
{ $from = 'From: ' . $name . ' <' . $email . '>'; // i.e. From John S. <Marc.sid@email.com>
$to = "webmaster@technologytuto.com ";
// here you would write the email address you
// want the information of the contact form to be send to
$subject = "New contact form message";
$content = " M./Mrs " .$name . " has sent you a message: \n" . $message;
$success = "<h3>Thank you! Your message has been sent, we will initiate a contact
with you very soon!</h3> <br/>";
mail($to,$subject,$content,$from);
echo $success; }
else { echo '<p class="error"><strong>Your message have not been sent<br/> The following error(s) returned:</strong><br/>' . $error . ' Please,
fill out the contact form again</p>';
}
} // end (isset($_POST['submit'])
?>
|
Explanation of the code above validating the contact form:
In This code, the statement if (isset($_POST['submit'])) checks if the
submit button is hitting before doing any control on form's fields,
if yes it create an empty variable $error that would contain the message
error each time. Then, each field would be control before using it:
- The field "name", "subject" and "message" would be validate the same
way by the code which verify if the field is not empty using
if (!empty($_POST['name'])) for the name, if yes it save the
value typed if not if add an error message in the variable error created
previously.
- The email is validated using the same process than the field "name"
but to make sure that the email typing in the form match with the
good email's format, the code
if (!preg_match("/^[_a-z0-9]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)
*(\.[a-z]{2,3})$/i", $email))
is used. You don't need to memorize the pattern use to check the
email format, just copy it an keep it somewhere for future needs
because the email format is still the same and known.
- The captcha is validated using the code
if(($_POST['code']) == $_SESSION['code']), which
compare the typed code and the stored code into the
variable "$code"of the session from the captcha.php file
and save or add an error on the existing error message if it
doesn't match.
After all validation's field syntax, if the error message is empty ,
it means that all fields have been properly filled out and that
the email typed has the good email's format, in this case the
information of the contact form are sent to the email specified
in variable $to using the code: mail($to,$subject,$content,$from);
and a success message that have been saved in the variable $success
is showed by the code echo $success; and in the case that the
error message is not empty nothing is sent and the contain of the
errors message is shown above the form to specify to the visitor
his error when typing in the form. Then the style sheet to
format the form will be like this:
styleecran.css
#contactform
{
margin:0 auto;
width:459px;
padding: 10px;
border: 1px solid #17375e;
background-color:#e7e7e7;
position: relative; left:20%; }
|
If you have already a .css file for your web application, you can just add the
source code above in this file, if not you should create one and don't forget
to specify the name of the .css file in the <head> </head> tag of your file
name contact-form.php. On this case the styleecran.css file is located
in the folder "css" situated in the root directory of the web application.
the code of styleecran.css file above would make the form has a grey
background, and would positionning it relatively a 20% from the left
according to its previous position.
<link rel="stylesheet" href="css/styleecran.css" type="text/css" media="screen"/>
|
The entire code source of the contact form would look like this:
contact-form.php
<?php session_start(); ?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Contact form</title>
<link rel="stylesheet" href="css/styleecran.css" type="text/css" media="screen"/>
</head>
<body>
<header> </header>
< section>
<?php
/*if submit button is hitting*/
if (isset($_POST['submit']))
{
$error="";
//-----------------------------------------
if (!empty($_POST['name']))
{ $name = $_POST['name']; }
else { $error .= "You didn't type in your name. <br />"; }
//-----------------------------------------
if (!empty($_POST['email']))
{ $email = $_POST['email'];
if (!preg_match("/^[_a-z0-9]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)
*(\.[a-z]{2,3})$/i", $email)) { $error .= "The e-mail address you entered is not valid. <br/>"; }
}
else { $error .= "You didn't type in an e-mail address. <br />"; }
//-----------------------------------------
if (!empty($_POST['subject']))
{ $subject=$_POST['subject']; }
else { $message.=" you didn't type a subject<br/>"; }
//-----------------------------------------
if (!empty($_POST['message']))
{ $message = $_POST['message']; }
else { $error .= "You didn't type in a message. <br />"; }
//-----------------------------------------
(($_POST['code']) == $_SESSION['code'])
{ $code = $_POST['code']; }
else {
$error .= "The captcha code you entered does not match. Please try again.
<br />"; }
// test if error is empty mean we have nothing to send else we send the
if (empty($error))
{ $from = 'From: ' . $name . ' <' . $email . '>';
// i.e. From John S. <john.smith@mail.com>
$to = "webmaster@technologytuto.com";
$content = " M./Mrs " .$name . " has sent you a message: \n" . $message;
$success = "<h3>Thank you! Your message has been sent,
we will initiate a contact with you very soon! <br/>";
mail($to,$subject,$content,$from); echo $success;
}
else { echo '<p class="error"><strong>Your message have not been sent<br/>
The following error(s) returned:</strong><br/>' . $error . ' Please,
fill out the contact form again</p>';
}
} // end (isset($_POST['submit'])
?>
/*-------------------- contact form itself--------------*/
<form method="post" action="contact_us.php" id="contactform">
<!-- placeholder is an attribut to set a default value to our input that would
stay if no value is enter-->
<label><h2> Contact Form</h2></label><br/><br/>
<label>Name</label><br/>
<input type="text" name="name" placeholder="Type subject Here " /><br/>
<label>Email</label><br/> <input name="email" type="email"
placeholder="Type email Here "/>
<br/> <!--placeholder="Type Here " would add a text in
the text zone like a default text-->
<label>Subject</label><br/> <input type="text" name="subject"
placeholder="Type subject Here"/>
<br/> <label>Message</label><br/>
<textarea name="message" rows="20" cols="20"
placeholder="Type message Here ">
</textarea><br/>
<!--captcha.php is a php file that create a picture in php and show
it as .png and here is used as image source--> <label>Please type this captcha to avoid spam <img src="captcha.php">
<br/>
</label>
<input type="text" name="code" placeholder="Type captcha code Here ">
<br/>
<input id="submit" name="submit" type="submit" value="Submit"/> </form>
//----- end contact form--------
</section>
<footer> </footer>
</body>
</html>
|
Note: Each field you want to add to the contact form would be
added the same way:
- First by adding it in the contact-form.php file specialy
into the < form> tag as others fields, and then, the code
to validate it would be added in the validation part like the validation
code of other fields. Sometime the validation code can
lightly change according to what you want to control.
If you like this post or have used the code above, please consider
give us a feed back of your experience in using this code to
have a contact form with spam protection(captcha)in
your web application!
J2ME: Hello World simple Mobile application
In this tutorial we will be showing you what you need and how you will create a basic java application for mobile phone using what it is called (MIDlets) in java 2 Microedition. We will be creating a simple Hello word j2me application that would display a text « Hello world » on a mobile device.
1.Necessary resources
We will use:
-The Sun Java wireless tool kit version 2.5.2_01: It is an open source set of tools to creat Java applications that run on Mobile devices compliant with the Java Technology for the Wireless Industry (JTWI, JSR 185) specification and the Mobile Service Architecture (MSA, JSR 248) specification. It offers you a build tools and utilities and a device emulator ( that help you to test your mobile application as if it were on a real mobile phone.
– And a simple java text editor like Textpad, that you can download a free version online
Before starting, download the Sun Java wireless tool kit version 2.5.2_01 or a higher version here and download the SDK( java Standard Edition SDK), or JRE(Java Runtime Environment ) here (go to ). We will choose to install because JDK (Java Development Kit) because it includes the JRE and is one important to be able to develop Java applications and applets. Where as JRE is only necessary on the system to run Java applications and applets. Windows even comes with its own JRE.
Then download Textpad here if you don’t have it.
2. Check if JDK is already install
To check if the JDK is already install on your computer, go to the prompt and type the command line: java -version like in the screen shot below:
If you got the same message with or not the same version number like below it means that you have JDK already installed on your computer. You don’t need to reinstall it, but only to make sure that the path throught the java.exe file has been specified in the classpath. If not, you must install it.
3.Installation
Start by installing the JDK
Now that you are sure that your jdk is not yet installed, double click on the downloaded file and start the installation by following the steps show by the installer.
Update of the environment variable classpath
Followed the step here at Oracle website ,
Then install the java sun wireless toolkit
Click on the .exe file of sun java wireless toolkit and after specify the path to install ( for us we install at C:\WTK2.5.2_01) and accepte to have a shortcut on your desktop, the installation will begin and you will see a window like the one below.
4.Set up of the Mobile application that show a Hello world message
To start, launch the java wireless toolkit from your desktop, then it window will appear like this:
a-Set up of the project that will content the source code of our Midlet
Click on the new project button beside the menu like below
A windows will appear, type the project name and the Midlet className, like in the window below, we choose
project name: HelloworldProject
Midlet class name: Helloworldmidlet
Note: As in every java code java language is case sensitive so HelloWorldMidlet is different to Helloworldmidlet, so pay attention to the the case.
Then another window called API selected will be show , for this project we have nothing to change there , just make sure that you the profil that is selected there, offer the most higher version of Midlet as Profile, and the CLDC as configuration, for this tutorials , we choose the MSA as target profiles that give us Midlet 2.1 as profile and the CLDC1.1 as configuration. This window look like below. So choose combination ( CLDC-1.1 MIDP-2.1) is valid for more than 75% of mobile devices released today (in your mobile device specifications you can find all of these) if it support Midlet implementation.
Then click on ok to validate and you would get this message in the sun java wirelee toolkit window:
The message in the windows above, said that the project have been successfully created and the folder bin, lib, res, src have been created in the appropriate folder of the project and the project is already open at this time. You can even check if those folders actually exist :
Here is a small description of those folders:
-Bin folder: Will content the executable file for your application(. Jar, .jad, Manifest) for a real deployment, but at this stade it content a .jad file and a MANIFEST only,
-Lib folder: Will be where we would specify any extern library that we will use in our mobile application. It may be for ex: KXML librairy,…..
-Src folder: Will be where the source file will be store.
-Res folder: Will content files like pictures that we want to include or use in our mobile application.
b-Create the source code file
Now open your textpad editor. Create a new file and start typing the content of your java file in. Because your class will inherit from a Midlet class, you must prior import the library that content the definition of the Midlet like this .
import javax.microedition.midlet.*;
Then you must declare your java class like this:
public class HelloWorldmidlet extends MIDlet { public void startApp() { } public void pauseApp() { } public void destroyApp(boolean unconditional) { } } |
-HelloWorldmidlet : It is the class name and it is a public class,
-And it overrides 3 abstract methods :
- startApp() which is the starter procedure of the application; it is the first function to be executed, after that the HelloWorldmidelet instance has been created;
- pauseApp() – This procedure is executed at the occurrence of an event that involves blocking the MIDlet application; for example if your mobile device is launching this midlet and your same mobile device receives a phone call during the execution of the application; this function will be excecute putting the midlet in a break status.
- destroyApp() – This procedure is used to close the application; it is executed at the end of the application and contains routines used to release resources; it acts like a destructor function;
All those 3 procedures are the minimal procedures that a midlet class should have, but at this step of the source code the Helloworldmidlet has no any visual effects because, no source code is implemented in their procedures so.
Now save the java file that is in your textpad editor in the src directory situated in the project directory that has been created when you created your helloworldproject from the Wireless tool kit, The way to reach this src folder look like this:
~ \j2mewtk\2.5.2\apps\HelloworldProject
save this file with the same name like your class name,do it like in this screen-shot below:
Because we want our Helloworldmidlet to be able to show a hello world message, the application must have access to the graphics resources controller’s. This is done by defining a Display object which is initialized at the start of the application. like this:
public class HelloWorldmidlet extends MIDlet
{
//reference to the application display manager
Display display;
public void startApp( )
{
display = Display.getDisplay(this);
}
public void pauseApp( ) { }
public void destroyApp(boolean unconditional) { }
}
|
Contrary to a java application on a computer, a java application on a mobile device has a restriction to be display within a single form or window at a time , and also the screen of mobile devices are smalls, so the Display reference is used to manage the visual ressource and to say what form is active at a time.
So to display our hello world message, we need a form and a container for the string, the library which containts class and methods to manage user interface is javax.microedition.lcdui
-We must import it first like this: import javax.microedition.lcdui.*;
-We must declare the text box that we will use to show the hello world message:
private TextBox tb;
-We must implemente the constructor of our class, by instantiating the new textbox with his message
public MidletHelloWorld( )
{
tb = new TextBox("My First MIDlet","Hello World !",100,0);
}
|
-We must activate the display with our text box in , whithin our startApp( ) procedure like below.
public void startApp( ){
display=Display.getDisplay(this);
display.setCurrent(tb);
}
|
Now our entire Helloworldmidlet java file will be like below:
| import javax.microedition.lcdui.*;import javax.microedition.midlet.*;public class Helloworldmidlet extendsMIDlet{Display display;PrivateTextBox tb;public Helloworldmidlet(){
tb = new TextBox(“My First MIDlet”,”Hello World !”,100,0); } public void startApp() { display=Display.getDisplay(this); display.setCurrent(tb); } public void pauseApp() { } public void destroyApp(boolean unconditional) { } } |
Now we are going to test our First mobile application that show helloworld.
Launch the wireless toolkit emulator, then open your project by hitting the open project button and go through the folders where your project have been saved , then select your project name and hit openproject button like below:
You would get a screen like the screen-hot below:
c- Packaging
To compile and preverify the project we must go to project menu , then take package then create package, like below:
This would:
-First compile the java source file into a byte code file by creating a Helloworldmidlet.class file
-Then would preverify the code before running it, the aim of the preverification is to check any error in the source code, if the preverification run good, the packaging is done by:
-
- Creating a file call MANIFEST.mf containing information like Midlet name, Midlet version,Midlet vendor.
- Creating a JAR file, for our case it would be helloworldmidlet.jar that is the package containing the class and the MANIFEST file.
- Creating a JAD file, for us it is Helloworldmidlet.jad this is the file that allow to install the application on the mobile device.
If the packaging works well you would get a window like this :
If not, It means that your java file has error and it would indicate the number of the line where the error is. If everything work well then we can run our application in the emulator;
Go to project click on run. The emulator will open, at this time the application is not yet being executed, it shows a window with the name of your project like below:
To start the application , you must select the Launch button (bottom right of the emulator) to run your mobile application Then you would get on your mobile emulator screen. a Hello World message like below:
We have done with our Hello world mobile application using J2ME.
To test a mobile application in a real environment, your personal mobile phone, the MIDlet application must be installed on your mobile device. We will talk about it in a next tutorial.
How to download and install Epi Info 7?
How to install epiinfo 7 ?
To install epi info, you need to first download it from http://wwwn.cdc.gov/epiinfo/7/index.htm
Click on the zip file to download it to a folder on your computer
Right click on that file to unzip it
Double click on “Launch Epi Info 7″ to launch it
You can also create a shortcut to your desktop by right clicking on the file and selecting create shortcut
Then drag and drop the shortcut on your desktop
Double click on the shortcut and voila!
You have successfully installed Epi Info 7!
How to set an automatic email signature into yahoo mail
You use yahoo mail, and you use to type your name, title , address and phone number, as signature at the end of each email you send. because you waste time doing it anytime, how can you set and automatic email signature that will appear at the end of each new email you want to send and that you can modify if you want?
- Connect to your yahoo email account. once at the main windows, open the mail option by going at the upper right of your window , click on options then choice mail options like below.

the email option windows will open on the general link. Click on signatureat the left sidebar and the signature window will appear like below:
- In the selected list choice the signature mode it can be ” show a rich text signature”, “show a plain text signature”, or “don’t use a signature” if you don’t want to set an automatic signature. see the screen shot below:

- In the textarea type the text you want as signature like below. notice that if you choice a rich text signature you would be able to format the text of your signature like below (size, font, color , add link,….), but if you choice the plain text signature you could not.
Then save the modification by clicking on any option at the left side bar( like clicking on general). your new signature have been set. And now if you go to write a new message you would see your signature automatically appears at the end of the page where you would type your new message like below.
You signature is now automatically set to appear into each new email you type.Hope this would help!
Should I Update a WordPress Plug-in if Update is Available?
You have just started your WordPress website or blog, and when you open your dashboard it appears on the top of the left side an update notice like the one below with the number of new version of plug-in to update available:
When you click on this updates link it shows you a windows like this :
This window above is showing a list of plugin that their update to a higher version are available. And to update you just have to check the check box beside each plugin you want to update then click on update plugins button on the top of the list.
Because every time there will be new versions of plugin, WordPress will be always showing an update notice in your dashboard, but should you update all the plugins that have updates available? here are some things you have to consider before deciding to upgrade your WordPress version or plug-in in order to avoid any surprise after:
- Make sure that the plugin will work well with the current version of your WordPress and will work with the other plug-ins you have installed, because the plug-ins are always compatible with some version of WordPress and not for other and work with some others plug-ins and not others, so before updating a plug-in try to read information on the plug-in homepage or this readme files to know which details changes and upgrades, and if it is compatible with your current WordPress version or others plug-ins.
- Make sure that the older plug-in doesn’t work good enough for you and doesn’t accomplish the task you want?
- Make sure that the new version of the plug-in, will add more value for you and your website(It might be released to fix any bugs or security issues).
- And also ask yourself if the new features provided by the new plug-in really required for your site or not.
Note: Never forget to make a backup of your website before any update of plug-in or of Wordpress version, so that you can restore the website if the update doesn’t work.
Those are my opinions, If you have others criterias that you consider when you want to upgrade a WordPress plug-in, please feel free to tell us about them by posting a comment or post a comment if you like the post:
How to delete Uncategorized in WordPress’ categories or how to change the default category
You have just started to use WordPress for your website or blog, you have created some categories and have assigned posts to those categories, without any issue. But when you display your website you find out that an uncategorized category appears like a category although you didn’t create it as category.
In fact is it the default category which comes with WordPress. WordPress assigns any posts you create without category to the uncategorized category. Also when you delete a category without having deleted its posts before, WordPress automatically assigns its post to the default uncategorized category So How to change this default category before delete it.
In the dashboard of your website, go to posts/ then categories, the categories page would open with the list of categories, hover your mouse over the uncategorized category or another category, you would see that the options “edit” “quick edit”, “delete” and “view” appear under the others categories’ name, but under uncategorized category only “edit” “quick edit”, and “view” that appears, like below:
This means that at this time you can not delete the uncategorized category, because it the default one so you have to prior change the default category before deleting the Uncategorized.
-
To change the default category, go down on the left size of your dashboard , click on setting, then click on writing, the writing setting page would open like below.
This page shows that the default post category is “uncategorized.” just click at the default post category dropdown box, and select the category you want as your default category (the one you have created by yourself and that you want as default category) like below:
Then click on save change button at the bottom of the page.
2.Then go to delete the Uncategorized by going to posts, then click on categories on the left side of the dashboard. When the list of categories appears, just hover your mouse over the Uncategorized once more and the options would show themselves like below:

Click on the delete link under the uncategorized, a warning box would pop up to alert you that you’re going to delete a category, but if this category had posts assigned to it , the message would say that the posts that were assigned to the uncategorized would be now assigned to the new default category you have chosen.
Click OK to make it so. Now You’ve deleted the uncategorized category and even replaced the default category.
If you like this tutorial, please consider post a comment !
Share your internet connection wirelessly without a router
You own an Internet connection on your computer and was wondering how can your child computer , wife or visitor computer can also share the internet connection without spending another money to buy material (router,….).
Here it is what you going to do to allow your computer to share its internet connection with other computers. Just follow this step by step tutorial to give internet connection to other computers around yours.
Note: For a best view of the screen shots and pictures appearing in this post, just click on them to have a zoom on the picture, and close them if you want.
How is this possible? When a computer is connected to internet it broadcasts its Internet connection over its Wi-Fi card and then acts like a router itself, allowing other devices to connect but with a restraint scope. because the network between the computers can only be a wireless, the computer who want to access internet from the main one with internet should have a wireless network adapter installed on it to be able to access internet.
So let us go through the process:
On windows PC (windows 7, xp ,…. ) this is possible thanks to a built-in feature of Windows pc that is called computer-to-computer or ad-hoc network.
A-On the computer that already have internet connection and which want to share it:
1-Go to control panel from the Start button, you would have this windows that would open if the view by catgory is actived in control panel. see the screen below:
Then click on Network and internet you would get a window like the one below:
In this windows click on view network status and tasks and you would get this others window
If you had done the same steps below , but on the computer that you want to be connected on internet, you would get the same window but looking like this:
Showing that this computer is not connected to internet.
2-Then, Click on Set up a new connection or network to be able to set the new ad-hoc network to share
internet. A window call choose a connection option will open, like below.
In this windows scroll down and select the option “Set up a wireless ad-hoc(computer to computer) network ”
Then click on next and you would get a window like the one below:
In the textbox Network name: give a network name for your new network , for our sample we choose : technologytutoNetwork, leave security type by default at WPA2- personnal. And at security key: enter a security key you choose It is like a password. For our sample we chose technologytuto2012network as security key. We can check hide characters to hide the characters of the security key and check save this network to allow the network to be save.

Important: At anytime when you edit the property of your network you are able to uncheck, the hide characters checkbox to allow you to see characters of your security key. This may be helpful to see what your are typing. Keep the security key somewhere because it will be asked when the other computer would try to connect to your internet connection using your network. When this
security key is set, your network will be secured so that another computer can not connect to internet througth your network if it doesn’t provide this key.
Then click on next and after a lap of time, time while the network is being configured , you will get this window:
Then click on turn on internet connection sharing and you will get this other window:
Then this one:
Now click on close.
3-Make sure that the ad-hoc network have been created by coming back to network status and tasks or network and sharing center from your control panel, then on the left side bar click on Manage networks, the network we have just created will appear like here:
And then, at the righ bottom corner of your task bar you will see this shortcut picture: ![]()
4-Click on it to open the network and sharing center or open it through control panel/network and internet/connect to a network you would get this window:
Showing your wireless network and other surrounding wirelless network , and because no computer other than the main computer is not yet connected to your network you would get the message “waiting for user “ near to your network name.
B-On the computer without internet who want to connect to internet
1-Go to the task bar click on the shortcut of available network you would get this window:
showing that this computer is not yet connected to internet but it already view the new network we have just created
Now you can try to connect it to this new network in order to access internet, for that:
- Select the new created network and make a left click, choose connect like below
- You would get a window asking you to give the security key like below: Enter your security key. For my case we choose technologytuto2012network

Note you may check hide characters to hide the characters when you are typing the security key. then click on ok to connect. you would get this other window.
At the same time in your network and sharing center from the task bar you will get this:
After some few seconds, if every thing have been well done you would get a window like the one below from the network and sharing center of the task bar
And from the network and sharing center from the task bar of the computer which shared its internet connection you would get a window like this one below:

Showing that the main computer is now sharing its internet connection to the second one, you can check out by openning a browser on the 2nd computer and see if you can open a internet connection.
If you like this tutorial, please consider post a comment ! :
Set up a parental control for windows pc ( windows 7)
Your children have internet access on their computer and you would like to be able to keep them from seeing things you find undesirable, instead of stay behind them to control them , set up a free window parental control .
Note: For a best view of the screen shots and pictures appearing in this post, just click on them to have a zoom on the picture, and close them if you want.
Here you are at the right place. We are going to show you how to set up a parental control on windows 7 that would allow you to manage how your children use the computer but limiting or choosing the web pages that they can see, the hours that they can log on to the computer, and which games or program they can play or run.
To set up Parental Controls,
- You need to make sure that you have a Hotmail account like this ”myaccount@hotmail.com“, otherwise you have to create one before starting the process. You need to enter account name and password of this account when setting up the parental control, and it is useful because windows uses it to inform you about everything allowed or not that your child tries to do on the computer with his/her account.
- You need to connect with an administrator account on the computer that you want to monitor, and make sure that each person you want to set up a parental control for has a standard user account. Because parental controls can be applied only to standard user accounts. If you haven’t yet created a user account just read this post “create a user account on Windows computer“.
- If you have hotmail account created and you connected with the the administrator account, go to Start menu, click on Control Panel, you will have this Windows:

Then, under User Accounts and Family Safety, click on Set up parental controls for any user. If you were connected with a non administrator account you will be prompt by a window asking to enter an administrator password or confirmation, in this last case type the password or provide confirmation for the administrator, then you will be at prompt to this screen:

- Click the standard user account that you want to set Parental Controls for. Here we choose the account name Kid1. Then you will be prompted by this window below, enter your hotmail account and your password and click on sign in.
It would take a certain time and then you will be prompted to this other window:
- Select the user account you want to monitor on this computer: for our example we click on Kid1 , then click on save , you will see this windows which is showing that the parental control is being set up.

and if everything is good you will get this window:
You see on the picture above that , the web filtering: block adult sites have been activated and the activity reporting too.
Click now on close, and your parental control has been turned on on the account Kid1 for this computer.Once you’ve turned on Parental Control for your child’s standard user account, you should customize the others parameters for a full control. this others parameters are: - Web filtering ( it allows to choose which web site your child could access or not ) when parental control is turn on this option is set up automaticaly to Block Adult Site. but to add others filters, click on Web Filtering: for example if you don’t want your child to be able to download stuff on internet and you want him only to access website you will select, in your web Filtering window Uncheck allow account to download file online and select with blue color allow list only like on this print screen below:
Then click on save, and on the left side select Web filtering list to add all the website you want your child to be able to access or add a specify website you don’t want him/ her to access. for example I want my child to be able to access only this two website: www.eduplace.com and www.discoveryeducation.com, I would type their address one by one on the text zone then I would click on allow and it would go into the list of allow websites like in these print screen below: 
Always click on save to save what you modified.
Note: you can also remove a website from a list of allow websites or from a list of block website only by checking the check box beside him and by clicking on the remove button up to the list.
- The Time limits (it is time when the user or kid will be allowed to log on to the computer, the logon hours for every day of the week may be different, If they’re logged on when their allotted time end, they’ll be automatically logged off) to set this up:-Go back to the user account you want to monitor by going at control panel> then click on user account and family safety> then click on parental controls, click on the user account and you will be prompt to a Microsoft windows live asking to enter your hotmail email and your password, just enter this parameter like below:

and click on sign in, you will be prompt to your hotmail account like on this windows below:
At the top right, click on Time limits link to open the time limit interface and an time limit interface would appears like below with a weekly time table, but it will be inactive until you turn the time limit on:
So , check the radio button turn on the time limit , then the time table will became more clear (active).
Select the space of time you want your kid to not be able to connect to the computer with his account, by holding the rigth click of your mouse down and go through it.
For my sample I would like my kid to not log on to this computer from Monday to Friday from 11AM to 06 PM and from 09PM to 11PM. It means that I want him to be connected only from 06PM to 09 pm, also I would like him to be able to connect on Saturday and Sunday between 03PM and 08 PM only. After having set all this restriction, my time limit interface would be like below:
always save your modification by clicking on the save button .
6.The Games (it allows to control access to games, you can choose the kind of games he can play, the age-rating level he can play, choose the types of games you want to block, and decide whether you want to allow or block unrated or specific games.
- Choose games rating level : According to the age of your child, choose a game rating level in the list of all the games rating level below , Just try to read the explanation of a rating level before choosing it. For example my child is 8 years old and I choose the early childhood rating level because the content is appropriate for child. see the print screen below:

Then click on save to save. After you can choose a specific game you want to allow or block.
- Block or Allow specific game: Click on the button situated under the list of rating level to activate a specific game you want to allow or block. you would get this window after clicking:

Then check beside the games you want to allow in the “always allow “column and the one you want to block on the “always block” column. For my case I want my kid account kid1 to always be able to play, family games and kids games only. So after setting this, my windows look like this:
Tips: In order to not waste time checking those rows, If you see that the number of games to block is more than the games to allow, start by checking the “always block radio button” himself which will block all the games and then you could check beside each game you want to allow. then click on save to save your modification.
7.Application and directories restriction: you can restrict which application/directory on the computer the account/child can access. For that, click on app restriction on the left sidebar of the hotmail account , you will get this windows:

Check the turn on radio button to activate this features, if you know the name of the applications/directories you want to block , just look at it in the list of applications on the computer and check the check box near to the application you want to block , for example for my case I blocked 2 applications to the account I am monitoring and you may see the application checked like in this picture below.
Tips: you can even use the search zone to search for an application or directory you want to block by typing its name in the search zone, before checking it in order to blocked access to it to your child account.

then save the changes by clicking on the save button.
8.Activity Reporting: Make sure activity reporting is turn on because it will allow you to have a report of the account activities, for that:
-In the same hotmail account on the left side bar click on activity reporting and check the “turn on activity reporting radio button”, and you can come there every time to follow the account activities. there , you would see a summary of account activities by clicking on the summary tab , or you can see his web activity by clicking on the web activity tab like below:

Or you can see his computer activity by clicking on the computer activity tab like here:

then save by clicking on the save button,
9.Contact Management: If your child, or the account your set up a parental control for has a hotmail account or msn messenger account you can always control who your child or the account chats and shares email with. For it , click on the left sidebar of your hotmail account and click on Contact Management, then you will get this window:
![]()
Click on add your child windows live id, you need to have your child hotmail account or msn account and his password ready with you, a new pop up window will open, click on the appropriate lint to add his hotmail or msn account
10. Allow request of a website/ games blocked or of adding a new msn contact: Sometime the account you are monitoring may want to allow certain websites/games you have blocked without knowing the importance or a new website or games good for him, or even want to add a new contact in his msn/hotmail account , you can always come to “ request” to see what your child / account your are monitoring request you, by clicking on request in the left sidebar then choose the appropriate tab to see what website has been requested or which contacts has been requested. This window look like this:

after all this done you may be sure that the account won’t access stuff you didn’t allow him to access. And if your child try to access a website site or an information you don’t allow, he /his would receive a window like this below:
If you like this tutorial, please consider post a comment !
Create a new user account on Windows computer
You want to share your computer with others persons and you don’t know how to prevent them to share the same desktop like you, the only thing you can do is to create an account on your computer for any different user.
Note: For a best view of the screen shots and pictures appearing in this post, just click on them to have a zoom on the picture, and close them if you want.
- First make sure you have been connected with an administrator account on your computer (the first account that have been created when the computer have been setup)
a. Then click on the start button on control panel you would have this windows that would open if the view by category is actived.
- On the option user account and family safety click on add or remove user account, this windows would open:

- Click on create a new account, this windows would open after:

- In the input text situated under the text “this name will appear……..” enter the name of the user that you want to create the account, this name would be used by him to connect to his own space on this computer, then leave the radio button near to standard user checked, because the account you are about to create is a standard account.Note: If you want to create an administrator account: Here you would choose the radio button “Administrator” instead of “standard account”. Now click on ‘‘Create account”bouton’ below.
This would return you to the first screen we saw before but with one more account created: the new account. For our example we created the user account name: Kid1 like in following windows:
- If you stop here and use the account, this account exist but is not enough secure because the account doesn’t have a password and so everybody could connect on this account without password. Then the better way to protect the account is to create a password for this account. on the last screen we got after step 4, click on the account you have just created and you would get this windows:
Note:Notice that in this screen you can :
- Change account name,
- Create password & remove password,
- Change the user account picture,
- Change the account type for example from standard to administrator,
- Delete the account.
From the windows openned when you clicked on the new user account, click on the link “create a password” and this windows would open:
6.In the input zone text type the new password and retype it in the second one to confirm it.
Check that your password respect those requierements below to be sure to have a strong password that can not be easily find by hacker:
- Is at least eight characters long.
- Does not contain your user name, real name, or company name,
- Does not contain a complete word,
- Is significantly different from previous passwords,
- And content a mix of characters of 3 out of this 4 categories
-Uppercase letters A, B, C,…..Z ,
– Lowercase letters a, b, c,…..z ,
-Numbers 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
-Symbols found on the keyboard (all keyboard characters not defined as letters or numerals) and spaces ex: ` ~ ! @ # $ % ^ & * ( ) _ – + = { } [ ] \ | : ; ” ‘ < > , . ? /For the user account Kid1 that we have created, we choose the password NakOW@12k.7.You can also create a password hint to help user remember his password if he loose it. but know that the password hint would be visible by anyone using the computer. - Note:You should know that a password should be created at the same time as its hint, if you want to create a hint for an existing password you would change the password first and create the new one at the same time with hint.
- Let enter the following hint for our new password and click on button ‘‘create password’‘and you will be prompt to another windows :

Note: if you look well this last window , you will notice that it is the same window as the first windows of step 5, the alone difference is that you have the link change password instead of create password,because at this step the password already exist. Now you can close the windows, if you type the wrong password when you are logging on to the computer with this account, hint will be show on the window screen and you could use it to log on to your computer with your user account.
If you like this tutorial, please consider post a comment !



























































