fuyuzero Posted May 14, 2007 Share Posted May 14, 2007 I am a beginning to learn PHP as a hobby. The wealth of tutorials and examples on the web has been at best a mixed blessing. I go to one site that tells me to use super globals, and the next tells me to never use them, instead to rely on session variables. Just now I spent some time looking for information on creating a simple login script, and found so many different ideas, all claming to be "simple" and are completely out of my league. Some sites talk about needing to validate form input, but fall short of giving any real information as to accomplishing this. So what is a novice programmer supposed to do? I seem to have a very difficult time sifting through everything to even get started. Advice? Quote Link to comment https://forums.phpfreaks.com/topic/51253-lost-within-too-much-contradiction/ Share on other sites More sharing options...
StormTheGates Posted May 14, 2007 Share Posted May 14, 2007 Ok I think the best way to learn is to code stuff and try it out Basically Ive been programming PHP for 3 years and I find Session variables much better than globals. When someone says "Validate form info", that normally means check to see if the user is doing what they are supposed to do. For instance: if(!$_POST['username']){ echo "You need to enter a username!"; } elseif(!$_POST['password']){ echo "You need to enter a password!"; } else { //Login Stuff here } Quote Link to comment https://forums.phpfreaks.com/topic/51253-lost-within-too-much-contradiction/#findComment-252478 Share on other sites More sharing options...
roopurt18 Posted May 14, 2007 Share Posted May 14, 2007 You want to rely on globals and session values as little as possible. The best advice would be to stop pissing around with tutorials and spend $25-40 on a decent book. There's a book thread somewhere in these forums; use the search feature. Quote Link to comment https://forums.phpfreaks.com/topic/51253-lost-within-too-much-contradiction/#findComment-252553 Share on other sites More sharing options...
boo_lolly Posted May 14, 2007 Share Posted May 14, 2007 i personally found online tutorials far more helpful than my php/mysql books. that mixed with practice. you can find some incredible tutorial sites in my signature. best of luck. Quote Link to comment https://forums.phpfreaks.com/topic/51253-lost-within-too-much-contradiction/#findComment-252558 Share on other sites More sharing options...
Nameless12 Posted May 14, 2007 Share Posted May 14, 2007 just buy a few books. Some people are better at explaining different things and some books focus on different areas, thats why I suggest multiple books. There is sooo much wrong with tutorials, in short tutorials are one of two things. 1. not written by experts and can mislead beginners in various ways 2. written for beginners and as a result usually avoid going into some areas that in my opinion would make it easier for beginners to grasp. Quote Link to comment https://forums.phpfreaks.com/topic/51253-lost-within-too-much-contradiction/#findComment-252563 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.