HOME       >>       Programming

I Need Help Finding The Best Way To Learn Php


dipesh1405241559

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


sparkx

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.

 

Good Luck,

Sparkx


Jeigh1405241495

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!


Miles

Hello,Aiming high, as you are doing, whilst many won't recommend it until you have a lot of PHP knowledge, is the way I amassed most of my programming knowledge. Despite people telling me not to, I made a 3D RPG style game in several game programming languages, always taking under a month to do so. My first javascript project was, interestingly, to make an isometric browser MMORPG. It's still in dvelopment, but a lot works (login, register, select a location, walk).Now, for your game, you will also be needing some javascript, as php alone could not do everything without a very, very, long time working out solutions. You'll also need mySQL, for storing data, or alternatively, if you have knowledge in any desktop programming languages, you could do what I done and create a server that sends back data quickly when it's needed, which itself reads from an SQlite database. For learning all those languages and technologies, you should visit a site for learing them, such as w3schools, recommended by many, or my personal favoruite, Tizag. All of them are great for beginners, and good luck with your project!


dipesh1405241559

thank you for your help everyone



VIEW DESKTOP VERSION REGISTERGET FREE HOSTING

Xisto.com offers Free Web Hosting to its Members for their participation in this Community. We moderate all content posted here but we cannot warrant full correctness of all content. While using this site, you agree to have read and accepted our terms of use, cookie and privacy policy. Copyright 2001-2019 by Xisto Corporation. All Rights Reserved.