Page 1 of 1
Testing php code before posting on web server
Posted: Fri Jun 20, 2008 4:29 am
by lhcpr
Hello there,
First time post and absolute newbie to php...
I am building a website that will have a mail php form function for a particular field. Is there anyway that I can test the mail-to function locally before I post on webserver? I just want to be sure that the field can actually be sent to the nominated email address.
I am using both Windows and Ubuntu OS.
Thanks
Graham
Re: Testing php code before posting on web server
Posted: Fri Jun 20, 2008 4:42 am
by matthijs
You can install a local webserver and test your code that way. On linux it should be easy. On windows there are packages like XAMPP which allow you to install the apache/mysql/php stack in one go.
If you're new to PHP it's advisable to post your code here before putting it on a live server, so that smart coders here can advice on improving the code, especially the security.
Re: Testing php code before posting on web server
Posted: Fri Jun 20, 2008 7:09 pm
by lhcpr
Hi there Matt,
I appreciate your help very much!!! I have been using phpFormGenerator to do the hard work, but will need to change some of the code.
Will post when done.
Again - thanks heaps
Graham
Re: Testing php code before posting on web server
Posted: Sun Jun 22, 2008 12:15 am
by RobertGonzalez
You're going to need a mail server to test mailing. You could hook into your SMTP server from your ISP, but that is not really what you are going to want since your web server is not going to be the same more than likely (at least it shouldn't be).
If you are using Ubuntu, use the package manager to install sendmail and the let your local webserver rip. It should work out pretty well for you.