I have some experience with HTML, but would like to learn to use php for my website. I’ve searched for php scripts and tutorials, but all I can find is either too advanced, or the websites are just full of advertising.
Tag: Learn Php
I have some experience with HTML, but would like to learn to use php for my website. I’ve searched for php scripts and tutorials, but all I can find is either too advanced, or the websites are just full of advertising.
I’m looking for neat, bigginer ( and a little advanced) php scripts, that I can see the source to study off of. I’m trying to learn php, and I was told that this is one of the best ways to learn.
I have litle experience with computer. I am planning change career and learn PHP onmy own. How long will it take me to be good at it and apply for a job? What platform do I ned to learn from? Linux or Windows? LAMP or WAMP? Thanks
I want to learn PHP programming but I do not have that big server computers or a network of computers. Is it possible to do PHP programming using only a laptop connected only to internet, through a 3g modem; and running on Windows XP SP3 OS? What are the application and/or software that I need to install to make it work?
Thoes For Dummies books just dont cut it thoes are the most horrible books I have ever read. I understand the stuff I already learned from them but the rest is a fail, I didnt learn crap from that book.
What are some good books for beginners to learn PHP Scripting? I am heavy into web design and I dont like useing programs like dreamweaver, I do everything by notepad.
A Beginner’s Guide To Php
By Ehsen Siraj
PHP is officially known as PHP: HyperText Preprocessor. It is a server-side scripting language just like Active Server Pages (Asp), Java Server Pages (Jsp) and Cold Fusion (CF). It is usually written in an HTML context. Unlike an ordinary HTMLpage, Server doesn’t send php script directly to a client; instead, it is parsed by the PHP binary or module. HTML in the script is ignored, but PHPcode is interpreted and executed. PHP code in a script can query databases, create images, read and write files, talk to remote servers- the possibilities are endless. Finally the php code result and HTML is combined and output is send to the client.
PHP Installation on your computer In order to run php on your computer you must have following components installed on it.
1. Web Server (IIS or Apache)
2. PHP
3. Mysql (optional)
Most websites advise you to install all components manually but its just wastage of time. Visit [http://www.wampserver.com/ ]http://www.wampserver.com and install latest version of WAMP it will automatically install php, apache and mysql on your computer with a single click. Its an open source software and very easy to use.
How to run php scripts
During installation WAMP creates a “www” directory in the installation folder. Save all your php scripts in it and then call it from your browser like this
“http://localhost/yourscriptname.php” where “yourscriptname” is the name of your php file.
First Script
Open your favorite text editor. Like HTML documents, PHP files are made up of plain text. You can create them with anytext editor, such as Notepad. However I advise you to use a specialized php editor. Macromedia Dreamweaver is the best php editor but its not free. You can find lots of good php editors at [http://www.sourceforge.net/ ]http://www.sourceforge.net
or simply Google it with keywords “free php editors”
Here is your first php script
1:
Save this script in www directory. Then call it from your browser like this
localhost/first.php
You will get following result;
Hello World
Remember : Always write your php code between opening and closing tags. Consider the following example.
Adding Comments to PHP Code
A comment is text in a script that is ignored by the interpreter. Comments make your life lot more easier because Code that seems clear at the time of writing, can be extremely frustrating when you come to amend it six or tweleve months later. Adding comments saves time besides it makes it easier for other programmers to work with your code.
You can make comments in many ways
Single line comments begin with two forward slashes (/ /) or a single hash sign (#).
All text from either of these marks until either the end of the line or the PHP close tag is ignored.
// this is a comment # this is another comment
Multi line comments begin with a forward slash followed by an asterisk (/*) and end with an asterisk followed by a forward slash (*/).
/*
Add your text here.
Interpreter will not parse it
/*
I can edit php/mysql but I have a hard time writing it. I know there are php tutorial web sites and what not but what is the most efficient? I can not spend any money and am needing something that is to the point.
Thanks a lot.
I have done some html only. I am now studying PHP for the last 2 day :). To be marketable I would like to learn Ruby & RoR on the same time. Do you guys think it is advisable? I think both languages have different syntaxes . Thanks.
I am thinking getting into the IT field. Was wondering if I should learn PHP/Mysql or SQL Server 2005? I am an old woman 48. I appreciate your answer. Thanks.









