Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Web [Tut]PHP/HTMLSimple Reference Guide

Status
Not open for further replies.
Legendary Battlemage
Loyal Member
Joined
Apr 7, 2009
Messages
647
Reaction score
25
I'm pretty tired of seeing people asking for help on basicPHP stuff, so Ima just gonna make a completely basic reference guide.

PHP:
echo "string"; - Writes string to the website.  String is HTML.
print "string"; - Pretty much the same thing as above.
$name - creates a variable.  Variables always must be called  with a $, followed by the variable name.
$_GET['global var'] - I believe its called a global var, but anyways, this gets the page variable thing.  For example - ?cype=... or newthread.php?do=newthread...
If you were to do $_GET['cype'], that would return whatever is after the ?cype=.
mysql_real_escape_string(var_to_escape) - Escapes all dangerous characters in a mysql query.  Crucial for preventing SQL injection (Although bypassable.)
stripslashes(var_to_strip_slashes) - Strips slashes('\') from the parameter specified.
isset(var) - checks if the variable is set.
session_start() - loads all session data
$_POST - gets elements from a form
$_SESSION - session data
session_destroy() - Ends the session.
<b></b> - Bolded text
<i></i> -Italicized text
<u></u> - Underlined text
<a href="url">Link Name</a> - Creates a link with the link name, if you don't want a link name, don't add the Link Name and the </a> (Optional: target="_blank" after "url" - Opens the link in a new window.
<a name="tag_name"></a> - Creates a tag, so users don't needto scroll to the area.  To use a tag, you use, site.tld/name.php#tag_name

That's prety much all you'll need for basic coding, update this later.
 
Last edited:
Junior Spellweaver
Joined
Jul 11, 2008
Messages
118
Reaction score
16
Nice guide, always wanted to learn php/html but never started. However, lately I've been thinking of learning ASP.NET instead... (Since I am learning some c#[mainly the c# equivalent of some java things] figured might as well learn another language using the .NET framework :p)
 
Legendary Battlemage
Loyal Member
Joined
Apr 7, 2009
Messages
647
Reaction score
25
Nice guide, always wanted to learn php/html but never started. However, lately I've been thinking of learning ASP.NET instead... (Since I am learning some c#[mainly the c# equivalent of some java things] figured might as well learn another language using the .NET framework :p)

lol k.
 
8===D
Loyal Member
Joined
Jan 19, 2009
Messages
613
Reaction score
96
Nice guide xSilv3rbullet! keep it up +1
 
Junior Spellweaver
Joined
Aug 11, 2009
Messages
172
Reaction score
8
Awesome guide.

I love it.

Prize: 1 thank for you
 
Newbie Spellweaver
Joined
Apr 2, 2009
Messages
44
Reaction score
0
I dont see how this is good. O_O
Any person can just go to php.net and find this.
 
Status
Not open for further replies.
Back
Top