Eclipse with PDT is a good platform to code on http://www.eclipse.org/pdt/downloads 123MB download . Best bet is not to test on the server you are uploading to, setup a wampp (Apache) install on your local machine to test on and once it is working as you expect then upload it with the altered config to match the other server. The wampp setup will have debugging outputted to the browser and your server might not making it harder to debug. As you code identify your common errors and check for them before testing is a good strategy as you are learning. Dr Mike Lance (CPIT) should be able to give you a site to visit on common coding errors. Try not to write it all from scratch and reinvent the wheel, look for a framework or library you can reuse like cake or zend for starters.
Set a time limit on how long you will battle with something before getting help, 1/4 hr to find a missing ; should worrying you because it would an employer let alone a 1 ½ days. Use Google a lot (search = “PHP then the thing I am looking for”). Andrew From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Johari Sent: Thursday, 23 October 2008 9:48 a.m. To: [email protected] Subject: [phpug] Efficient way to write PHP codes Hi, I'm still new to this forum. Currently I'm at final Semester in CPIT doing Grad Dip in ICT. My project is to build an e-commerce website and I have done the E-R diagram, Data Dictionary, etc for the database. I was given a space at Techlabs Server and I had created a database tables and inserted sample data. I had finished testing all type of SQL queries needed and tested directly with the MySQL Database Server. It's all fine even though I had few difficulties at first. The "real" problem started when I used PHP to communicate with the MySQL Server. When I uploaded my finished "test" version and run it in my browser, I get a blank page - obviously it's not running as expected, and I didn't know what's wrong with my code. I use Notepad++ to configure the codes. Therefore, I had to re-code again.... and check my codes line by line comparing to the working codes just to find out what had went wrong. Then I found out that I missed the (;) in one of the codes. This problems, took me 1 1/2 days. That's a setback since I was thinking to write the PHP codes and upload it to the server bit by bit. Now maybe I have to do everything locally, and only upload the final one. But I also want to make sure that it will work with the server (as part of my QA plan). I have read few books and I was told how to write a good code, but not really how to write it efficiently... so, while I'm still googling around to find an efficient way to write a good code, can anyone can give me some advise based on your experience dealing with PHP horrors? Thank you very much for your time. Johari --~--~---------~--~----~------------~-------~--~----~ NZ PHP Users Group: http://groups.google.com/group/nzphpug To post, send email to [email protected] To unsubscribe, send email to [EMAIL PROTECTED] -~----------~----~----~----~------~----~------~--~---
