I have an install file, and the mysql database created but i dont know why this wont work..
<?php
$connect = mysql_connect("localhost", "eyecatch_clients", "<passhidden>") or die ("Could not connect");
$select = mysql_select_db("eyecatch_clients", $connect) or die ("Could not select database");
$query = "drop table clients";
$result = mysql_query($query) or die ("Could not drop clients database.<br>".mysql_error());
$query2 = "drop table admin_info";
$result2 = mysql_query($query2) or die ("Could not drop admin database.<br>".mysql_error());
$query3 = "create table clients (client_name varchar(255) not null, password varchar(255) not null, id int(11) auto_increment, unique(id))";
$select3 = mysql_select_db("eyecatch_clients", $connect) or die ("Could not select database.<br>".mysql_error());
$result3 = mysql_query($query3) or die ("Could not create clients table.<br>".mysql_error());
$query4 = "create table admin_info (username varchar(255) not null, password varchar(255) not null)";
$select4 = mysql_select_db("eyecatch_clients", $connect) or die ("Could not select database.<br>".mysql_error());
$result4 = mysql_query($query4) or die ("Could not create admin table.<br>".mysql_error());
$query5 = "insert into admin_info values ('<namehidden>', '<passhidden>')";
$result5 = mysql_query($query5) or die ("Could not insert default admin info.<br>".mysql_error());
mysql_close($connect);
?>
i have the db setup, and it all works, because it connects.. you can view the error at http://www.eyecatching.com.au/install.php
if someone could take the code above, and fix it for me, i would be most appresiative... Thankyou
Phill