beginner question
Moderator: General Moderators
-
eddie21leeds
- Forum Newbie
- Posts: 1
- Joined: Tue Nov 25, 2008 3:23 pm
beginner question
hi to all from sunny leeds! my name is eddie and ive been getting in to php for a few months now... im a web designer and so far i've learned to use includes and scripted a form to mail script as well as messing about with a few framework tutorials. what i want to know is: what is the next logical step from here from a web designers point of view? - what do i learn next? are there any other tricks such as includes and the mail function that will be of use to me in the future? thanks for reading. eddie.
-
robincanaday
- Forum Newbie
- Posts: 14
- Joined: Thu Nov 20, 2008 12:25 am
- Location: Portland Oregon USA
Re: beginner question
As a fellow newbie, I recommend these books:
PHP 6 and MySQL 5 for Dynamic Web Sites: Visual QuickPro Guide
PHP 5 Advanced: Visual QuickPro Guide
Or anything else by Larry Ullman. He has a great support forum for his books, a better place to ask newbie questions than here.
PHP 6 and MySQL 5 for Dynamic Web Sites: Visual QuickPro Guide
PHP 5 Advanced: Visual QuickPro Guide
Or anything else by Larry Ullman. He has a great support forum for his books, a better place to ask newbie questions than here.
Re: beginner question
Welcome to the forum, Eddie (also robincanady). Wow, that's opening up a huge subject. PHP is such a general purpose language that you can do almost anything that's logical at the server end. Forms and databases come to mind. Then things like guest books, user registration, customizable pages (dependent on being a registered user, or on your geographic location, as derived from the IP address), and so much more.
The two online treasure troves are:
http://php.net/ and
http://w3schools.com/
The two online treasure troves are:
http://php.net/ and
http://w3schools.com/
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
Re: beginner question
Tricks? Millions...whether they are useful to anyone other than you is the more important question...are there any other tricks such as includes and the mail function that will be of use to me in the future? thanks for reading. eddie.
Don't write code only you will understand...even if you are the only one who will *ever* work on it...the logic is simple...if someone finds it difficult to comprehend your code...chances are so will you when you leave something and come back to in 6 months time.
Learn as many best practices as you can...confirm them for your self...unfortunately this takes years of experience as you cannot possibly make many mistakes in a single day...
Time and experience is the only trick I know of thats truly undisputable...everything else is subjective but I won't start that debate again.
Here are some cool "tricks":
1. Instead of using
Code: Select all
if($a == $b){
echo 'Me';
}
else{
echo 'You';
}Code: Select all
echo ($a == $b ? 'Me' : 'You');Code: Select all
$bgcolor = ($count & 1 ? '#FFEEFF' : '#EEFFEE');4. Don't use double quoted strings unless you actually have a need for it...
5. Validate everything, use proper escaping routines, filter any non-essentials charactcers and lastly use htmlentities() when echo'ing to your templates to avoid embarising XSS exploits.
Re: beginner question
I was in Leeds the other day, drinking at The Swan. It wasn't sunny though.eddie21leeds wrote:hi to all from sunny leeds!
Re: beginner question
It never is, inside a pub, now is it?onion2k wrote:I was in Leeds the other day, drinking at The Swan. It wasn't sunny though.eddie21leeds wrote:hi to all from sunny leeds!
Re: beginner question
We were sitting outside. HA! HAAAAA! I WIN!!califdon wrote:It never is, inside a pub, now is it?onion2k wrote:I was in Leeds the other day, drinking at The Swan. It wasn't sunny though.eddie21leeds wrote:hi to all from sunny leeds!