Actually I've worked out how to create a table, but how would I make it so that the table's name is the directory's name. I've found how to do it in php;
<?php
$junk=getcwd();
$pass="0"; $long=0;
$tv=strlen($junk); $dvd=$tv-1;
while ($pass=="0")
{
$vhs=substr($junk,$dvd,1);
if ($vhs==chr(47)) {$pass=1;}
if ($vhs==chr(92)) {$pass=1;}
$long=$long+1; $dvd=$dvd-1;
}
$vhs=substr($junk,$dvd+2,$long-1);
print "$vhs";
?>
and that'll give the directory, and the table creating script is;
<?php
include("dbinfo.inc.php"); //get settings
mysql_connect($host,$user,$password); //connect to database
@mysql_select_db($database) or die( "Unable to select database"); //select a database or give a error
$query="CREATE TABLE [i]TABLE NAME TO BE DIRECTORY[/i] (checkbox TEXT NOT NULL )"; //create the table checkbox, with type TEXT
mysql_query($query); //execute it
$query2="INSERT INTO checkbox (checkbox) VALUES ('0')"; //add a 0 to field checkbox
mysql_query($query2); //execute it
mysql_close(); //close the connection
?>
Finished creating table.
How could I do this so that the Table name is that of the directory.
Thanks