Connecting To Mysqli

You are not authorised to view this page - Please login first


Rate: 1 Star Rate: 2 Stars Rate: 3 Stars Rate: 4 Stars Rate: 5 Stars

Love it / Hate it

Comments + Likes

Connecting To Mysqli

Programming / PHP

Connecting To Mysqli

A tutorial showing you how to create a connection file for mysqli
Connecting To Mysqli was posted by and has had 178 view(s) with an overall rating of 3
Posted by


This Tutorial has had 178 Views

Create the file = 'connect_to_mysql.php'
Then add this section of code were you wish to include and connect to your database.

<?php
connect_to_mysql
.php
?&gt;

  
Then edit the file 'connect_to_mysql.php' and add the following segmentation of code.

<?php
$db_username 
"ENTERUSER"[/b];
$db_host "localhost"[/b]; // add 'localhost' if the database is on the same server or add EXAMPLE '208.223.1.122'
$db_pass "PASS"[/b];
$db_name "DATABASE"[/b];
@
mysqli_connect($[b]db_host[/b],$[b]db_username,[/b]$[b]db_pass[/b]) or die ("Try looking at config Erhh"[/b]);@mysqli_select_db($[b]db_name[/b]) or die ("no database Listed"[/b]);
?&
gt;

  
And there you go :)

created on 15/11/2009 @ 16:32, last updated on 02/07/2010 @ 23:18
aProject.info Twitter RSS

  Copyright PHPTutorials.co © 2009 - 2010