i got the solution but now am hving another problem...sorry...
i am using :
$connect = mysql_connect($_POST['dbhost'],$_POST['username'],$_POST['password']);
if ($con !== false){
if ($_POST['dbcreate'] == 1){
$sqlFileToExecute = "UCMSSQLCreateDB.sql";
$f = fopen($sqlFileToExecute,"r+");
}
else{
$sqlFileToExecute = "UCMSSQL.sql";
$f = fopen($sqlFileToExecute,"r+");
$db = mysql_select_db($_POST['dbname']);
}
$sqlFile = fread($f,filesize($sqlFileToExecute));
$sqlArray = explode(';',$sqlFile);
foreach ($sqlArray as $stmt) {
if (strlen($stmt)>3){
$result = mysql_query($stmt);
if (!$result){
$sqlErrorCode = mysql_errno();
$sqlErrorText = mysql_error();
$sqlStmt = $stmt;
break;
}
}
}
if ($sqlErrorCode == 0){
echo "Installation was finished succesfully!<br><br>";
}
else {
echo "An error occured during installation!<br>";
echo "Error code: $sqlErrorCode<br>";
echo "Error text: $sqlErrorText<br>";
echo "Statement:<br/> $sqlStmt <br><br>";
}
}
else{
echo "Connection to SQL File Failed!";
}
mysql_close($connect);
it works.. but now am hving another problem is tat how do i include the table prefix tat i prefer.. instead of compiled during sql export?