PHP Error

Oh that’s useful thanks DT,

I guess there is little point in try to match my local settings to the results generated by the same page on my host’s server, if they in turn are unlikey to match anyone elses php installation - is that right?

Cheers

Hi PMM, I am beginning to realise this now. One sytax error and the whole thing goes south :sigh: Still I guess if I can get it right the result should be better.

Thanks again for all the help :smiley:

I love php to be honest, it has great power and can do many great things, but the attention to detail needs to be spot on. Not many wysiwyg editors pickup syntax errors in php, which is annoying and hard work. PHP is a dev language, and unlike many other dev platforms compiles on demand, so a syntax error is say c# shows in your IDE, yet in PHP I’m yet to find an editor that will give you a clue.

I confused matters slightly with my typo in the very first post, as you may have now noticed I missed a single

The next set of errors is purely down to the php compiler setup, and yes the second method I posted is a stronger way of doing things, however you do need to look at what happens if someone adds pg=10002948012747 in your page. This would be managed much better using switch, as you have a ‘default’ which if nothing matches it goes to, so adds strength to your data validation.

DT.