What stuff on a website can't be tested locally?
If everything can what do I need to be able to test it?

If you have an application in PHP / HTML / CSS / Javascript, you can test most things in a local test environment. You need to have a "LAMP" environment installed on your local machine. For more info: http://innovationsdesign.net/wb_2.7/pages/tech-resources/php-help.php

One of the things that you are limited on testing locally is the sending of emails. The library that I use has the option of dumping the output that it would have sent so I can still verify it that way. You can set up your local machine to act as a mail server but that isn't usually necessary. Other than that, you can do almost anything in your local machine.

In my opinion you will probably have much more flexibility on a local machine than on a hosted solution. There are a few pain points I have encountered before though.

First, if your app is running a command line utility make sure it is available on all platforms or make your code capable of compensating and have it run different commands based on the os.

e.g. Your app uses `ls` to get a directory listing. This will fail on windows.

Second, php extensions have been a problem on windows. Outside of the common ones that ship with the installer, you're left to either find a pre-compiled one, build it from souce, or use pecl. All of those methods have been troublesome at one point or another. However the opposite is also true, you probably won't have as much flexibility on a hosted machine as the host will be in control of what is on and what is off.

As far as mailing goes, I would never advocate the use of mail() over smtp. It is trivial to use a php mailing library that connects to smtp without any issue. If you're using smtp sending mail from your localhost is a breeze. Just configure it to use ANY smtp gateway you have access to. Even the mail server on your hosting account, gmail etc.

I tried this code in that this guy shows in his video. When I try it locally it does not work when I tried it on a server (it is not my server it is a school server I temporally can use) it will output the text submitted. When i try it locally nothing happens.
http://www.youtube.com/watch?v=IRXYaY8LrwQ

Do you have a PHP environment installed locally?

I would suggest, WampServer, XAMPP or EasyPHP

Are there any real differences between the 3 programs?
Also what do they do exactly? I am a bit lazy right now to do the research because I'm busy with some other stuff I need to get done.

Ahh so we should do the leg work for you...I see..
Yes master, right away master!

That won't get you anymore help from me...sorry

Ahh so we should do the leg work for you...I see..
Yes master, right away master!

That won't get you anymore help from me...sorry

Well no, I never said you have to do anything you dont have to be a jerk.

I will just look into later.

Has nothing to do with being a jerk and that was not my intention. For everyone 1 person I see on these forums who actually make an effort, 5 more come here and simply say "give me ..." then never come back.

I'm more than happy to answer questions for you and point you in the right direction, just don't tell me you're to lazy to look it up, so I should just tell you the difference instead.

Has nothing to do with being a jerk and that was not my intention. For everyone 1 person I see on these forums who actually make an effort, 5 more come here and simply say "give me ..." then never come back.

I'm more than happy to answer questions for you and point you in the right direction, just don't tell me you're to lazy to look it up, so I should just tell you the difference instead.

If it was pure laziness I wouldnt tell people to do it. Its just that I am working on other stuff for the website and I didnt know if I would have time to look for it on my own. I just thought I would ask if people knew the difference to help me save time because I never took any classes on web programming and I have to make a website for class and im spending hours trying to figure out small details here and there.

Wamp server is my personal preference on windows. Getting a local environment setup is the first step towards getting a better handle on things. All of those packages will provide, Apache, MySQL, and PHP and a handful of other varying apps. But those are the three you need to be able to work locally.

As far as learning php, there are tons and tons of great beginner tutorials. I suggest you google around. Get a solid understanding of the basics, variables, arrays, control statements, loops, etc. These are the integral building blocks to everything. Follow that up with learning how to create functions and deal with include files. If you have any specific questions start threads and show us what you're stuck on. There are a lot of very helpful people here who can guide you along.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.