I’m using PHP 5 for mysql on a Windows XP Pro box to learn some basic connectivity for an upcoming project….i’m new to this game so i’m still trying to learn the basics
I got an error doing some basic connectivity using mysql_connect() :
<?
$username=”root”;
$password=”xxxx”;
$database=”Cars”;
$manu=$_POST[‘manu’];
$model=$
$year=$_POST[‘year’];
$connection = mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( “Unable to select database”);
$query = “INSERT INTO cartype VALUES (”,’$manu’,’$model’,’$year’)”;
mysql_query($query);
mysql_close();
?>
my index.html file calls insert.php (which is what i have above) and when it runs it comes back with an error;
Fatal error: Class ‘mysql’ not found in C:Program FilesApache GroupApache2htdocsinsert.php on line 10
there is one thing i read on search that i haven’t tried yet, simply because i don’t know how….a possibility that mysql extension not installed for php, but that was applying to somebody with php 4.x.
What other possibilities might there be?
my php.ini path on httpd.conf is correct….although i am using the “ini recommended” file whatever that means.
does it matter that my .php file is seperate and not imbedded in my index.html file? should I embed it and make it index.php?