Hey sup,
I have installed apache 2.2 on windows and mysql as well.I created a database and also a function , but I cant seem to connect to the database via the browser.(I installed php on apache as well)this is what I have and the error i'm getting.
<code>
<?php
// Connect to the database
$dbhost = 'localhost';
$dbusername = 'root';
$dbpasswd = '***';
$database_name = 'simple';
$connection = mysql_connect("$dbhost","$dbusername","$dbpasswd")
or die ('Couldn't connect to server.');
$db = mysql_select_db("$database_name", $connection)
or die('Couldn't select database.');
// Generate SQL code to store data on database.
$insert_sql = 'INSERT INTO simple_table (text) VALUES ('test text, 1,2,3')';
// Execute SQL code.
mysql_query( $insert_sql )
or die ( 'It Didn