First, create a new document any size you like, I made mine 300 x 300.
Then get you circular marquee tool and draw a circle while holding shift
to make it perfect. Then grab you gradient tool and fill it with a gradient
similar to the one below. Pick any color you like.
s
You should get something like this:
Now make two more layers (Ctrl + Shift + N) and draw two hands using
the steps from above.
You should get somthing like this:
This is how your layers should look:
Now, draw a decent sized border around the circles using any method you
like. The easiest way would probally be by just adding a stoke. Make it any width
you feel looks good.
Make a new layer and call it "glare". Grab the circular marquee
tool once again and draw an oval the is about 3/4 of the width and just
short of the height of the body. Fill it with the white to transparent
gradient shown below.
You should get something like this.
Now set the opacity of the "glare" layer to about 25% or whatever
you feel looks good.
This is what I got with 25%.
Make a new layer (Ctrl + Shift + N) and call it "eye". Draw
a small elongated oval on this layer and fill it with black.
Now move the same selection you used to fill in the eye and move it slightly
down and to the right. Now hit delete. Once you have done this, deselect
everything and duplicate the layer. Then flip it horizontally and move
it over. These steps are shown below.
Now draw a mouth, you can do anything as simple as just a little circle
to a big 'ol grin, be creative. Once you have drawn the eyes and mouth set
the opacity of the layers for the mouth and eyes to about 50%.
And your done! You can add some scenery or even add a little animation like I
did below. Hope you enjoyed the tutorial!
Email is used by most people that use the internet and is good for sending activation codes and notifications to users when you have a website.
To send an email you use the mail() function and it requires 3 parameters.
$to = "email@address.com";
$subject = "Our Subject";
$message = "The message to send";
$header = "From: you@email.com";
mail($to, $subject, $message, $header);
?>
The Easy Way
It is more convenient to create and test PHP/MySQL scripts on local computer rather then a remote web server. It is a good practice to create and test applications on local and private computer and then deploy online. In this tutorial we will look at the process of Installing PHP, MySQL and Apache on windows server without any hassle. First we will look at the hard way and then we will use easy way to install these three applications on our windows system. The hard way is that you download PHP, MySQL and Apache applications from following web URLs.
PHP > http://www.php.net/downloads.php
MySQL > http://dev.mysql.com/downloads/
Apache > http://httpd.apache.org/download.cgi
and install them one by one. After installing configure them so that they can work with each other. This process is little bit hard for newbies as one should have the configuration knowledge of these applications. Now we will not dig deep into hard way and instead we are gonna focus on the easy way. We all like easy and free things. Don’t we? Fortunately there is one windows web development environment that comes for rescue.
It is called WAMP server and it is located at http://www.wampserver.com. It allows you to create web applications with Apache, PHP and MySQL. It comes with few more goodies like phpMyAdmin and SQLiteManager to manage your database effectively. Without wasting any time, jump to the download page, Figure – 1, which is located at http://www.wampserver.com/en/download.php and download this wonderful application. The latest version you can download is v2.0.
Run the installer, it will warn you about deinstalling version 1.5. If you are using v1.5, you have remove it first from your system and then install version 2.0. Don’t forget to take backup first, as they say, “Backup Now / Backup Often”.
Install as you usually install windows applications. If you have selected default option, installer will install the package into wamp folder in C drive i.e. in c:\wamp folder. If FireFox is installed on your system, installer would ask about using it as default browser, say Yes.
Use default values for PHP mail parameters. Click on Finish button. Voilaa!! You have just installed Apache, PHP, MySQL on your server up and running. It was as easy as abc. Run the WAMP server. Once you double click on the shortcut for WAMP server on your desktop, this server will silently sit with the task icons on task bar.
Click on wamp icon to see, Figure -4, the control panel. As you can see that now you have a got a centralized control panel for Apache, PHP and MySQL. You can also stop and start windows services from Quick Admin sub-options. With a left click on the wamp icon, you would be able to
- manage your Apache and MySQL services
- switch online/offline (give access to everyone or only localhost) - install and switch Apache, MySQL and PHP releases
- manage your servers settings
- access your logs
- access your settings files
- create alias
With right click
- change WampServer’s menu language
- access this page
Now let us focus on how to start with wamp server. When you install wamp server a www directory is created and if you had gone with default options during installation, it would be c:\wamp\www. Open up, your browser and type http://localhost in the address box.
You will see page similar to as shown in Figure - 5. This page tells you some information about the server settings like version info of Apache, PHP and MySQL and loaded extensions of the PHP. It also give access to the three tools, phpinfo(), phpMyAdmin and sqlitemanger. We will cover these three tools in a separate tutorial, however phpinfo we would discuss here. It also displays the Aliases that also we will cover in a future tutorial. One more inf wamp server is providing and that is Your Projects. Your projects will be displayed under Your Projects label.
Ok, now create your first project. You just have to create a folder inside of c:\wamp\www folder. Go ahead and create a folder, temp. Refresh the browser and wamp immediately placed temp under Your Projects label.
You can create as many projects you want. Now we will test whether PHP is working on our system or not for that we will use phpinfo() function. Phpinfo() function provides every information about the PHP configuration. Now you have to create a PHP file. You can use any text editor to create a PHP file. If you have access to Macromedia Dreamweaver use that. Here we will create file using the windows notepad application. Open notepad and type php code as shown in Example -1.
Example – 1 : Testing PHP
phpinfo();
?>
Save the file as test.php inside your project folder test. Make sure that you place file name inside of quote while saving file with notepad, otherwise it will make file extension as .txt and it would look like test.php.txt. When saving files type file name as “test.php”. Type http://localhost/temp/test.php in browser and view the page. If you are able to see the page as shown in Figure – 6 ; congratulations, PHP and Apache system is up and working.
Now we will set an index page for your project. It will be a PHP file, nothing special. Copy and paste code from Example – 2 into notepad. Save the file as index.php inside temp folder which is is inside the www folder. Again, make sure that you enclose files name in quotes while saving . Now main page for you project is completed. You can access it from http://localhost/temp url, alternatively you can click on the temp link under Your Projects label on main WAMP page.
Example – 2 : Index page for temp project.
Welcome to my website !! This is HTML text. Next line which you are seeing is generated by PHP.
echo ‘
’;
echo ‘I have just installed WAMP server and it is working great.’;
?>
You must see the result as shown below.
If you have come this far, congratulations all the steps are successfully executed. Now you can start writing PHP scripts and create your dynamic web application. Share with us what you have created.