I am trying to learn how to create a CRUD tool to get my first taste of playing with MYSQL. I am using the following tutorial: http://trendinquirer.com/simple-crud-in-php-add-edit-delete-view-in-php/
Building on WAMP server locally.
I have all the functions working however every page is giving me MYSQL deprecation warnings.
I am very new to this and wondering if anyone can give me any pointers as I seem to be too new to make sense of the PHP manual.
When I change:
<?php
mysql_connect('localhost','username','password'); /** Syntax ==> mysql_connect(SERVERNAME,USERNAME,PASSWORD); **/
mysql_select_db('development_logs'); /** This will select the databasename **/
to:
$connection = mysqli_connect('localhost','username','password');
if (!$connection) {
die("Database connection failed: " . mysqli_error());
}
// 2. Select a database to use
$db_select = mysqli_select_db($connection, 'development_logs');
if (!$db_select) {
die("Database selection failed: " . mysqli_error());
}
I then get a whole new set of errors corresponding to my index.php page around this string:
<?php
$result = mysql_query("SELECT * FROM website_logs");
while($data = mysql_fetch_object($result) ):
?>
Any help on at least getting past this point would be hugely appreciated.