View Single Post
Old 04-11-2009, 07:12 PM   #8 (permalink)
CrazeD
CrazeD's Avatar
 
Wizard Techie

Join Date: Feb 2006

Location: Maine

Posts: 3,686

CrazeD will become famous soon enough

Send a message via AIM to CrazeD Send a message via MSN to CrazeD
Default Re: PHP MySql help :]

PHP Code:
<?php

$dbc 
mysqli_connect('databaselocation''mysql username''mysq password''database')
or die(
'Error connectiong to MYSQL server.');

$sql mysqli_query($dbc"SELECT * FROM cmmnts");

while (
$row mysqli_fetch_array($sqlMYSQLI_ASSOC)) {
    echo 
'First Name: '.$row['first_name'].'<br />
          Last Name: '
.$row['last_name'].'<br />
          Email: '
.$row['email'].'<br />
          Comment: '
.$row['cmmnt'].'<br /><br />';
}

?>
I'm not 100% sure if this will work, because I never use mysqli...but try it.
__________________

Need website help? PM me!
CrazeD is offline