Habbo is boring, but Habbo Fansites develops your first knowledge of coding

Habbo is boring, but Habbo Fansites develops your first knowledge of coding
I just cant get a grasp of PHP
Its not that hard:
PHP Code:<?php
$username = "Dentafrice,";
if($username == "Dentafrice,") {
echo "Your username is Dentafrice,!";
}else{
echo "You fail at life.";
}
?>
I know that, i mean more advanced PHP
Like....?
MySQL e.t.c
thats not php but then querying is very easy when php and mysql 'bond' together![]()
you spelt grammar wrong, as well as a lot of other things on the siteWe are currently hiring News Reporters. http://www.skylightlobby.com
Requirements
- Experience
- Good grammer and spelling
but i like the site overall
(not gonna apply though)
no
I am coding this in the quick reply so it ain't very clean:
To use it, create a new file called config.phpPHP Code:<?php
class db {
var $server;
var $username;
var $password;
var $database;
function start_connect() {
if($this->username == "" || $this->password == "" || $this->server == "" || $this->database == "") {
echo "ERROR, cannot connect.";
exit;
}
$this->connect_mysql();
}
function connect_mysql() {
mysql_connect($this->server, $this->username, $this->password);
$this->select_db();
}
function select_db() {
mysql_select_db($this->database);
}
}
?>
PHP Code:<?php
include "mysql.php";
$db = new db;
$db->server = "localhost"; // MySQL server
$db->username = "root"; // MySQL user
$db->password = "bla"; // MySQL pass
$db->database = "bla"; // MySQL db
$db->start_connect();
?>
Want to hide these adverts? Register an account for free!