hey i am a beginer at programming I wanted to know if it was possible to start from php .. all i know is a bit of html and some sql.
Please help me in this ... and how important is it to know cgi scripting to work on php ??
Starting PHP from Scratch
Moderator: General Moderators
- Ambush Commander
- DevNet Master
- Posts: 3698
- Joined: Mon Oct 25, 2004 9:29 pm
- Location: New Jersey, US
When I was first starting out I found it easyer to learn if I had a reason or something specific to do. You may be interested in making a big site or something with PHP and if so you gotta remember to start small. Building large projects with bad technique is never a good idea.
If you want here's my suggestion and a bit of a challenge. Search around on the internet to try and make a simple login page. Here is basically what it should be like:
1. login form(standard HTML)
2. PHP processing(check if the set username/password matches the one the user entered.)
3. Redirrect the user to the appropriate page(members area or show a message if they entered the wrong information)
A simple script like this can be made with the following PHP functions:
if () { }
strip_tags();
$_POST[];
echo "";
Thats my suggestion to you if you wan't to get started with something reasonably small. If you have any problems making a script like this don't be afraid to ask questions. If your a little confused about where to get started I'll find you some tutorials, just ask. As far as an online resource goes you can research the functions I listed by going to PHP's website: php.net
If you have any questions whatsoever we're all here for you. Remember to use lots of comments ( // YOUR COMMENT HERE ). Comments are one of the best ways to keep your scripts organized.
Good Luck
If you want here's my suggestion and a bit of a challenge. Search around on the internet to try and make a simple login page. Here is basically what it should be like:
1. login form(standard HTML)
2. PHP processing(check if the set username/password matches the one the user entered.)
3. Redirrect the user to the appropriate page(members area or show a message if they entered the wrong information)
A simple script like this can be made with the following PHP functions:
if () { }
strip_tags();
$_POST[];
echo "";
Thats my suggestion to you if you wan't to get started with something reasonably small. If you have any problems making a script like this don't be afraid to ask questions. If your a little confused about where to get started I'll find you some tutorials, just ask. As far as an online resource goes you can research the functions I listed by going to PHP's website: php.net
If you have any questions whatsoever we're all here for you. Remember to use lots of comments ( // YOUR COMMENT HERE ). Comments are one of the best ways to keep your scripts organized.
Good Luck
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
Another really good thing to do is go to Sitepoint.com and download the sample chapters of Kevin Yank's "How to build a database driven website using PHP and MySQL". The first four chapters are free and they will actually show how to develop a mini app in those first chapters.
When I was starting out a few years ago that is where I started. Then after I built a few small (and absolutely terribly coded) apps, I downloaded phpBB and tried to sift through the entire application to see if could figure out how it worked. Soon after I was developing my own full fledged web applications.
Hang in there. PHP is probably the easiest server side scripting language to learn and it is amazingly powerful. This community is a God-send and you will find yourself coming here more and more, at first for help, then to offer it.
When I was starting out a few years ago that is where I started. Then after I built a few small (and absolutely terribly coded) apps, I downloaded phpBB and tried to sift through the entire application to see if could figure out how it worked. Soon after I was developing my own full fledged web applications.
Hang in there. PHP is probably the easiest server side scripting language to learn and it is amazingly powerful. This community is a God-send and you will find yourself coming here more and more, at first for help, then to offer it.
Each one of these below is a seperate project:

- Learn to make a "Hello World" program.
- Make a program that adds two numbers together and outputs them.
- Output two input fields from one page onto another page after submitting.
- Add those two values and output the result on the next page.
- If the result on the next page is less than 5 color the result "red", if not color the result "green"
- Make a page that lets a (hard coded) admin "login" and set your first session variable
- Use an INSERT statement with an input field
- Learn more php at http://www.php.net