Php mysql apache problem?

  • Thread starter Thread starter Cloudtailx
  • Start date Start date
C

Cloudtailx

Guest
I installed PHP, MySQL and apache on my PC. Php and apache work perfectly fine together and mysql works on it's own (using the command prompt) but when i try to write any php code that uses mysql the browser can't find the file. (using firefox - blank page, in opera i get the error! page with "Remote server or file not found").
I'm using this code:
<?php
$user='guy';
$password='xxx';
$host='localhost';
$database='new';
mysql_connect() or die ('unable to connect');
mysql_select_db($database) or die ("unable to select database");
$query="show tables";
mysql_query($query);
mysql_close();
?>
I think i made the database correctly and i made the user and password too. Anyone have any suggestions about what i should do?
P.S. there is some sort of pack called XAMPP should i just install that?
 
Back
Top