IT Blog, Web Development,

Quick 10-Step PHP FAQ for Beginners

2 m read
QArea Expert
QArea Expert Marketing Manager
May 6, 2014
Share on
Reading Time: 2 minutes

When web development services are getting more complex to provide, developers usually turn to the PHP programming language.

Learning it from the very first is not an easy business. But here’s the top 10 issues PHP beginners usually face starting learning the language, and their immediate answers.

  • What is PHP?

This is a popular multi-purpose scripting language designed especially for web development and it’s possible to embed in HTML.

  • I’m looking for online documentation or tutorials for learning PHP.

For a start, try using Zend.com tutorials.

  • How to run PHP locally on PC?

To do that, you’ll need a web server installed on PC. The easy and working way to run PHP locally is to get the free XAMPP app from Apachefriends.org, install it on your PC and let it then install PHP, MySQL DBMS, phpMyAdmin together with Apache web server on your PC.

  • How to upload images and the like with PHP?

Htmlgoodies.com features a detailed tutorial for web developers called ‘Upload Images Using PHP’.

  • How to create a CMS by means of PHP?

This is a difficult one. It’ll be better to use one of the variety of open-source CMSs possible to get on the Internet. A range of good CMS choices is well presented on OpenSourceCMS.com.

  • While running the PHP script, an error is indicated in a certain line, but I can see no problem there.

Chances are PHP in that line could get badly confused and even give up, but this not necessarily means the root of your problem lies in that very line. When getting a message like this, you should examine the line and start going all the way back over your code to search any syntax errors. An editor equipped with syntax color-coding could help you with this a lot and let you see some significant errors quicker.

  • My script won’t work right I have no idea why.

Your problem is you can’t code defensively yet which is an important thing to do. To learn this, you should give up thinking that variables are always set just like you expect. Instead, check their values before going on to functions like empty() and isset(). Also it’s useful to learn the error handling functions PHP provides.

If you have a question on how to provide some web application development services with PHP, act as follows. First, check if there has already been a similar problem on the forum. If not, describe the problem to the forum members: tell about how it’s expected to work, what it actually does, what you tried to correct it, etc. It’s recommended to use built-in [php] tags around coded sections so that they are easy to read. Your questions should be accurate and brief.

  • How to write login-controlled web pages with PHP?

You can normally do this with PHP sessions and the database containing user login information for user login verification. When the login is successful, the session variable is set. Next, controlled pages are to check if this session variable is correctly set. If not, you should redirect the user to the login page.

  • How to send an email using PHP?

To cut a long story short, you should use the function mail(). To find more info about this, check, for instance, bokehman.com “Mime Mailer script”.

Share on
Privacy Preference Center
Your Privacy

When you visit any web site, it may store or retrieve information on your browser, mostly in the form of cookies. This information might be about you, your preferences or your device and is mostly used to make the site work as you expect it to. The information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies. Click on the different category headings to find out more and change our default settings. However, blocking some types of cookies may impact your experience of the site and the services we are able to offer.

Strictly Necessary Cookies Always Active

These cookies are necessary for the website to function and cannot be switched off in our systems. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.

You can set your browser to block or alert you about these cookies, but some parts of the site will not then work. These cookies do not store any personally identifiable information.

Performance Cookies

These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us to know which pages are the most and least popular and see how visitors move around the site.

All information these cookies collect is aggregated and therefore anonymous. If you do not allow these cookies we will not know when you have visited our site, and will not be able to monitor its performance.

Cookies used

Google Analytics
Functional Cookies

When you visit any web site, it may store or retrieve information on your browser, mostly in the form of cookies. This information might be about you, your preferences or your device and is mostly used to make the site work as you expect it to. The information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies. Click on the different category headings to find out more and change our default settings. However, blocking some types of cookies may impact your experience of the site and the services we are able to offer.

Cookies used

Test Second Test
Targeting Cookies

When you visit any web site, it may store or retrieve information on your browser, mostly in the form of cookies. This information might be about you, your preferences or your device and is mostly used to make the site work as you expect it to. The information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies. Click on the different category headings to find out more and change our default settings. However, blocking some types of cookies may impact your experience of the site and the services we are able to offer.

More Information

When you visit any web site, it may store or retrieve information on your browser, mostly in the form of cookies. This information might be about you, your preferences or your device and is mostly used to make the site work as you expect it to. The information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies. Click on the different category headings to find out more and change our default settings. However, blocking some types of cookies may impact your experience of the site and the services we are able to offer.