October 7, 201015 yr At uni at the moment and we don't cover PHP, just actionscript/javascript. Is PHP worth a learn, I don't really want to be a developer but do web design for some extra cash and will probably do so for a few years while I'm getting on my feet. How difficult is it to learn compared to say Javascript? Mostly asking because I've been asked for a couple of sites now where it's needed, I really want to avoid the whole jack of all trades master of none thing.
October 7, 201015 yr I started learning from someone on here and then they disapeared, i would say once you get the basics it helps alot in solving problems, you dont nessacerly need it but it is one of the useful web dev languages to know
October 7, 201015 yr PHP is in my opinion very easy to learn. If you've ever coded in languages such as C, C++ and C# then you more or less already know the syntax. The keywords/function names also make perfect sense unlike some languages. As for how useful it is I would say VERY. How many websites these days do you spend more than 10 minutes on and how many of those are static with just a little javascript. My guess is very few. All in all it's a great thing to learn and my favourite language. @ayoungh - Since you invited me to my new favourite website, I'll try help you out with php where I can
October 7, 201015 yr @ayoungh - Since you invited me to my new favourite website, I'll try help you out with php where I can Thanks
October 7, 201015 yr its way easy to learn php. for getting start i will say start form w3schools.com php tutorial
October 7, 201015 yr Thanks Same with me, I thought he just got fed up and blocked me. Maybe he did?!
October 7, 201015 yr Same with me, I thought he just got fed up and blocked me. Maybe he did?! Do you mean the learning PHP? I was really getting into it aswell? I think he has blocked me as he is on the forum sometimes lol
October 8, 201015 yr How difficult is it to learn compared to say Javascript? Hi, The PHP syntax is very similar to JavaScript. If you are ok with JS then you would pick up the basics of PHP easily. I know might look a little daunting at first but php.net (php manual) is invaluable. For example if you're looking for a string function etc... in fact a lot of JS and PHP functions have the same name and syntax.
October 8, 201015 yr I have learned and got the best of Javascript and as such I learned PHP, very similar languages although some may disagree. Back end and front end etc. In my opinion it is always worth having PHP in your bag, so to say, as most jobs it is either an essential or it is a very desirable thing to have. Regards, J
October 12, 201015 yr Author My only issue is I don't want to be one of these people that know a bit about everything and never master one thing. Saying that, yeah...I agree with you lot. I think it's worth a learn (although I don't want to pursue development). It seems like every man and his dog know PHP, but for me...knowing a language is being able to sit there...maybe with a book on hand and being able to whip up something special. Knowing PHP isn't learning the syntax then changing a few things on Wordpress.
October 12, 201015 yr And just to clarify i did not block anyone lol i lost internet for quite awhile to be honest, but on topic php is very important to learn prob 10 times more then javascript, considering say u wanna validate a form with javascript well u can do it but somebody also can turn of JS and bypass validation thats where php comes in, almost all contact forms ect.. are built in php so i'd master that if anything and put JS aside for abit
October 12, 201015 yr Hey I'm struggling with resources for learning PHP. The manual is of course a great reference tool, but is there a resource explaining how you do explicit things? Like how to create a function for editing database input? I just can't read the whole PHP manual and figure it out function by function. What I would like to learn right now: I'm working on a form for adding football players to a database. That is simple. But how do I edit for example the player "Alessandro Del Piero" with a shirt number of 10 or an ID of "2"? I want to write a function where I can edit players through an url lik ...players.php/edit/id2 or player.php=edit?id2 Hope someone can help me out. Hopefully give me a link with lots of these hints and tips. Php security, best practices, ect. Something like a Smashing Magazine for PHP, that is up to date. All the sites I've fround seem a little outdated. Or maybe I should buy a book? Or an e-book? Any help is welcome!
October 12, 201015 yr I'm working on a form for adding football players to a database. That is simple. But how do I edit for example the player "Alessandro Del Piero" with a shirt number of 10 or an ID of "2"? I want to write a function where I can edit players through an url lik ...players.php/edit/id2 or player.php=edit?id2 It's a bit more complicated than just using a function. This tutorial http://www.killersites.com/community/index.php?/topic/3064-basic-php-system-view-edit-add-delete-records-with-mysqli/ has a demo http://www.falkencreative.com/forum/records-mysqli/view.php which shows the table in a web page and has buttons for edit record, delete record or new record so you might learn from it. It has a view.php page which shows the table with the edit buttons and a records.php page for the editing/deleting/adding. Remember that if you can edit data from a web page, so can someone else maliciously unless you password protect the page.
October 12, 201015 yr Wickham: Thank you very much. I will take a look right now. This seem to be perfect for what I want to achive! Regarding security: Is it just me, or do PHP developers tend to focus to much on protection the input code rather than determine what's allowed in the database? You won't be able to overwrite an ID as long as it is a primary key, set as unique or you are using foreign keys to keep data in different tables the same. For numbers, you only allow integers, and so on. Doing that, you won't have to think about escaping all your code. As far as I've understood so far, the problem seem to be varchar type or field types where you are allowed to use a lot of different characters. I understand that these need escaping, but my point being: Why not set up you DB a little better in the beginning? It will save you a lot of security tests. Please, please correct me if I'm wrong here. Password protection: I know. I will defiantly look into this if I ever plan on publishing some of my code. As for the time being, this is sort of a hobby project. I realize that once I've finished the first version of this code, I will probably rewrite it because I've learned during the coding. That is what I'm planning on.
October 14, 201015 yr HUGE rolleyes. Read some info about santising and filtering input. Always assume that some is going to enter some scary code into your input fields and each piece of scary code could delete/compromise your database. Developers are paranoid about data sanitising for good reason - it is essential in any project! I wrote "Please, please correct me if I'm wrong" for a reason. I asked you a question, and as a more experienced developer, you should educate instead of making a fool out of me. I will of course read about sanitising as I want to learn. What I'm trying to explain here is this: it would be better to list a couple of functions in php for sanitasion and filtering, link to good articles etc. As I've said before. I struggle to trust a lot of sources on PHP simply because I don't know the "best practices". A lot of articles seem outdated, and when I try to validate an opinion on how to do something, I often end up with several different answers. So, rallport: Please help a beginner out with a starting point for learning about this.
October 14, 201015 yr As someone who's just turned the corner with php - I now can't see how I did without it. I wholeheartedly recommend learning at least some basics. Tutorials are ok, but you're best maybe choosing a project that requires php. For example, I just created a CMS for a company - the company administrators can add information to the system, and then clients/affiliates can log in and view data relating to their cases etc... It's something that I've developed as I've gone along and learned a LOT in the process. I have had some support from here too - Andy with jQuery and Steve with the php. As a result, I know now that I can offer clients more, and that the design of my sites in future will be quicker i.e. using include files for footers etc.
October 14, 201015 yr Including files making it quicker for you to develop, but to be technically correct slows down your site when compared to straight HTML I did not know that! Always learning
October 15, 201015 yr As someone who's just turned the corner with php - I now can't see how I did without it. I noticed you've added it to your website list too Well done for picking it up!
November 24, 201015 yr I did a 'HUGE rolleyes" because not trusting user input is mentioned on pretty much every tutorial you come across and this applies to just about any language that requires user interaction with a database. If anyone is going to f things up then the user will find a way of doing so and it won't necessarily be their fault.
November 24, 201015 yr Yeah, I know that know. I've learned a lot on coding PHP since that comment. I'm filtering content based on isset() and !empty() if so, I'm using mysqli_real_escape_string and strip_tags on text, ctype_digit() for numbers, checkdate() for dates and so on. If you want to learn PHP, I recommend VISUAL QUICKPRO GUIDE: PHP 6 AND MYSQL 5 FOR DYNAMIC WEB SITES by Larry Ullman. It's just f***ing great! Even if PHP 6 is not a stable release, you'll learn a lot from it. It teaches you all a noob would need to know of the basics. Best book I've come across on PHP.
November 29, 201015 yr No php is not as difficult language as you think. Its all depends upon your interest. There are lots of tutorials available of internet.
Create an account or sign in to comment