DaLightz
See ya'll in the afterlife.
- May 19, 2012
- 1,136
- 262
Hello, just heard the news of MySQL not being used anymore in the new PHP update. So I am starting to get used to MySQLi now since i have never quite used it before.
So, here we go. This is just as new to me as it is to a 'noob' so please feel free to correct me if i have done something wrong.
Connect.
Something.php
Please let me know if this is correct. I have a feeling it's not.
So, here we go. This is just as new to me as it is to a 'noob' so please feel free to correct me if i have done something wrong.
Connect.
PHP:
<?php
// Connection bit here..
$connect = mysqli_connect('localhost', 'root', 'popmycherry', 'Habbodb');
// Check yo' self.
if (mysqli_connect_errno){
echo 'Connection error: %s\n', mysqli_connect_error());
exit();
}
?>
Something.php
PHP:
<?php
// Require the Mysqli class
require_once 'MySQLi.php';
//The query.
$new_query = mysqli_query("SELECT * FROM users WHERE username='. $something here .'");
?>
Please let me know if this is correct. I have a feeling it's not.