hi my name is dipesh, i resentally signed up to the site and would like the know the best way to learn php programming, my end goal is to create an mmorpg which is turn based like astroempires and ogame
That’s good you already have a goal or "project": to build a web-based game. That is the first step. I suggest that you start by A: Doing a small project then building off of it or B: start with your goal. After all isn't the best way to learn something is by using it the way you want to. Anyway to start off, you should think about what you want to accomplish in small portions for example one of your first may be: build a login page that displays a user's level if logged in else a login page. There are lots of tutorials to do just that (I can't remember but I am sure that I have made a few posts on Xisto). If you are not sure about how to do this (what to search for est.) read on. Basically your first page of PHP generally contains an IF statement to check if logged in by checking a cookie (data stored on the user's computer). It also connects to a database and has some basic variables set. From there you can require other pages based on both the user and a page ID. Here is a brief explanation and differences between common data types used in PHP.
PHP - This is the source of it all. Global information and data is put here. Think of it as a template, you have a place for the user's name, level est. to go into but they are not their yet.
MySQL - All your "changeable" data such as usernames, levels est. are stored in databases so you don't need to write your HTML/PHP page for every user. This data can be changed with PHP MyAdmin read this: Overview of setting up MySQL and Connecting. In our example this is the name, level est. that is inserted into the PHP.
Cookies - Since all your data is in a database and you can select it you need to make specification on the user so that John Doe doesn't have get Jain's info. Most PHP sites use WHERE tags that check for a "password" from the user's computer. You can do this two ways: make the server check the WHERE for the IP or even better have the server get a cookie (data received from the computer that was set by the server) read this: Cookies. This is also used a lot for identification but CANNOT be trusted because people can change both their IP and Cookies. In our little example, this is usually used as the key to your office "template". Insert in your key and either get rejected (3 rejections you get kicked from the building all together) or get into your unique office.
I know that is probably way confusing but it is good to know what everything is. Look through the tutorial section of Xisto to find just about everything about PHP. I also like to use: Tizag for MySQL and I have heard that people love W3 Schools.
I will second that W3 Schools is amazing. I've also used tizag as well so I can back up the claim that both are great resources for learning php. In reality php is not that overly complex to get the basics down pact and in turn you can learn alot by running through basic tutorials on these sites. If you have programming experience it should come fairly easy and if not I would recommend following any tutorials closely from these sites or trying out each new piece of code as they teach you about them. I'm pretty sure both those resources would also talk about any of the related required MYSQL tasks that you will face.As an overall rule as well, web coding is very popular and as such anytime you get stuck a simple google query will usually result in a quick example to help you solve your problems. Good luck learning php!
thank you for your help everyone
|VIEW DESKTOP VERSION||REGISTER||GET FREE HOSTING|