Now that we are getting many files at the begin of every tutorial i am going to list the name of the files we are going to be using and creating.Files We are going to use

Safe.php

Usersonline.php

Left.php

Files We are going to create

Config.php

View_Profile.php

Edit_Profile.php

Find_Player.php

View_Profile.php
We are going to look in to creating profiles for users to have a little profile about themselves and it will display an user basic information like rank / wealth status.

We are going to do things a bit different today. I am going attach View_Profile.php. The reason being that its gets confusing really quick. So click and download View_Profile.php.View_Profile.php(4.78K)Number of downloads: 459
I am still going to explain it and there are comment in the coding to help you understand what i am taking about.

After downloading the file. Adds this field under your mysql users table.

profile text NOT NULL,

That field holds the information of the content on the users profile (We will get to that later).

The way the View_Profile works is different to any other page you will be creating. There will be no direct link to View_Profile.php, This is because If you do get to View_profile.php it will be blank because it dont know what users profile to get information from. This is way we are going to use the

$_GET

Function in php. The URL of the View profile will be in the format "www.example.com/View_Profile.php?name=Denis". the "?name=" is going to carry the name of the user who will want to get information on. So we use the $_Get function to get it.

How the $_Get function works. The Function is written like this

"$_GET['name'] "

The [name] part referrers to the "name" in the browser. The Get function gets the data from the URL link provided. So whatever is at the end of the "=" we are going to get and search for in the database. If you dont understand the Get function please read more on it from the PHP Manuel.

If you try to run View_profile.php you will get errors Follow the steps below to avoid these errors.

THIS PART IS VERY IMPORTANT, PLEASE MAKE SURE YOU UNDERSTAND THIS AND CARRY OUT THE STEPS BECAUSE THIS IS THE BACKBONE OF YOUR GAME.

You might be wondering how we are going to do out ranks and wealth ranks etc. We are going to create a file called Config.php

On Safe.php we are going to add new arrays that are going to hold Important Information. These informations are in arrays and they are :-

Cars

Cars value

Location

Ranks

Wealth Ranks

Weapons (Gun)

Weapons price

Protection

Protection price

These are the arrays that we are going to add to safe.php. Open Safe.php and add the array below.

This is the fun part of the game creating ranks weapons etc etc. Please remember you can change these values to what suits your game best and you can add/remove to the list. In fact you should edit this list and add your own ranks cars and locations. Be imaginative explore things and be very creative.

Back to view profile. On view profile you can see that we used the rank and wealth rank arrays. Study them well because it is easy to use. We also use the staff arrays we made earlier so show is an user is an admin ,mod , or hdo.
Those are the mains things on View_profile.

If we are on users online and you want to click on an user to see their profile nothing happens. This is because for now it is like this

echo "$online_name.";

Thats just echos the name of the members. For it to get to View Profile we need to echo it with the link to their profile, which is this.

So go to Usersonline and Find "echo "$online_name.";" and replace with the code above.
If you did that right you should be able to click on your name and see your profile.

Edit_Profile.php
Now that we have profile we need to give people the tools to edit it. Step One - HTML
The only thing that the player will be able to edit is the Quote which is under their information on their profile.
Create a page called Edit_profile.php and add the following.

This is a very simple search code. All it does is search the database table "users" under name and it will display the result of all the members that fit under the condition.
If a result is found it will display name and rank. You can modify the content to your liking.

If you dont understand anything from this part or you see any mistake or grammar errors or coding error/improvement please post below, thank you.
If your code is not working
If your code is not working dont worry we all make mistakes. Here is a list of things you should check are completed. :-

Check and make sure you have the Right Field names in your php for example if the name of your button is called "Submit" make sure when you are referring to it on your php code make sure you type "Submit"

If your are clicking on a button, and nothing is happening you need a form field around the html. <form method="post"></form>

If you are getting lots of connection errors it is because you dont have your left and right included on the page. Remember on every page includes your left and right, like this<? require("Left.php"); ?> <? require("Right.php"); ?>. Please remember that <? require("Left.php"); ?> needs to be before any html on the page and it needs to be online one

If your error is not on there please post it below and i will be happy to help you

That is it for today tutorial. In the next tutorial we are going to look at improving our Right and left Menus and we are going to create a simple Help Desk where users can ask questions for your HDOs to answer. See you then.

How could I remove the protection and have it set up where players have a set amount of protection when they sign up?Would I just program it where it just puts them in protection when they sign up?

do you even have a kill page?/>/>

Right now I have started with the layout of the main page and im working on the login page.Im still new at this been learning HTML css java and PHP for the last few months trying to study up on as much as I can while giving my game a go.