Join us at IRC!
It is the path of least resistance that makes rivers and men crooked. - Bj Palmer
Thursday, May 17, 2012
Navigation
Members Online
Total Online: 35
Web Spiders: 19
Guests Online: 31
Members Online: 4

Registered Members: 70039
Newest Member: p0isoN
Latest Articles

PHP Programming



FLV Blaster - Download Music and Videos Faster

website security PHP is one of the most used, high-end web language. It's very easy to learn but you can't know it all :P. You'll fall in love with it very fast.
When you're getting the hang of it, you can begin injecting php into web sites ;)



First, to learn and test PHP on your PC you need an Apache server and maybe a MySQL database. Get All-in-one WAMP(Windows Apache MySQL PHP) here:
http://www.wampserver.com/

I'm not going to give all possible things, just the most recent, most used and easiest things.

Basics of PHP:
--------------

every line ends with a ; if not, the scblockedript will not execute.

Opening tag: <?php
You could also use <? but not all servers support that, so it's safer to use <?php

Closing tag: ?>

outputting text:
this is done by the echo command.

<?php
echo "hello HBH";
?>

When processed, this will give a page with Hello HBH on it.

Varaibles:
You can recognize variables by the $-sign in front of it.

<?php
$text="hello HBH";
echo $text;
?>
Again, this will give a page with Hello HBH on.

<?php
$text="hello";
$text2=" HBH";
echo $text.$text2;
?>

When combining variables, insert a . (dot) between them.
Again, this will give a page with Hello HBH on.

Now that you know the very basics I'll explain the if else statement. This compares to variables, if the comparision is true it will echo something, if it's false, something else.

<?php
$text="hello";
$text2="hbh";

if($text==$text2){
echo "True!";
}
else{
echo "False!";
}
?>

In this case, a page will pop up saying False! If $text2=hello then it'll echo True!

That's it for today! I'm not discouraging you but you still know jack about PHP :P but you're getting the principle I hope.
If you're really going to learn HBH I suggest a book by Wiley, PHP in a nutshell. For the more advanced coders out there I suggest Secure PHP & MySQL Web Developement, Third edition by sams.

I hope y'all enjoyed my first article and learned a tiny bit about this HUGE language.
Rate it boys 'n girls!

Official PHP site:
http://www.php.net

-Superpimp

Comments

god on March 23 2006 - 17:30:37
pretty good :) simple and combines all the basics, recommended for newbie php coders :D
BluMoose on March 23 2006 - 17:34:30
Nice introduction, I personally recomend w3schools.com to continue learning ;)
Ven0m on March 25 2006 - 18:57:16
nice! I dont know much about PHP but I got this. thanx.
willeH on March 25 2006 - 21:42:29
hmm too simple imo. Nice article none the less.
superpimp on March 26 2006 - 15:41:14
well, it's a article for noobs, so ;) If anyone has any requests about PHP-related articles, PM me. I might be able to help ;)
Darth_Pengo on June 03 2006 - 15:46:58
What about LAMP? not everyone uses "Windows"
EnglishPanda on June 17 2006 - 20:08:58
Nice article.
-The_Flash- on June 21 2006 - 02:46:11
"If you're really going to learn HBH I suggest a book by Wiley, PHP in a nutshell." I've not heard of that language... - Nice article though! ^^
Post Comment

Sorry.

You must have completed the challenge Basic 1 and have 100 points or more, to be able to post.
Ratings
Rating is available to members only.

Please login or register to vote.

Awesome! 25% [1 Vote]
Very Good 75% [3 Votes]
Good 0% [No Votes]
Average 0% [No Votes]
Poor 0% [No Votes]
Guest
Username

Password

Remember Me


Bookmark This Page
Affiliates
Adverts

 

 

Links
By using, viewing or obtaining any information contained on this site, you agree to the disclaimer.

© HellBound Hackers 2008- 2009. Since 3rd December 2004.