Sure. I use this kinda method for uploading articles/news to my own site. Instead of using PHP directly, I throw it into a form that I can access.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Upload an Article</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body style="padding-left:30">
<?php
mysql_connect('localhost', 'root');
mysql_select_db('documentation');
$maxid = mysql_query("SELECT MAX(id)+1 AS totalnum FROM articles");
$row = mysql_fetch_assoc($maxid);
?>
<form action="upload.php" method="POST">
<table style="font-family:arial;" cellpadding="8">
<tr valign="top">
<td>Title:</td>
<td><input type="text" name="title"></td>
</tr>
<tr valign="top">
<td>Article:</td>
<td><textarea cols="40" rows="20" name="article"></textarea></td>
</tr>
<tr>
<td>Article Number</td>
<td><input type="text" maxchars="3" name="articleNo" value="<?php echo $row['totalnum']; ?>" ></td>
</tr>
<tr>
<td>Written By:</td>
<td><input type="text" name="by"></td>
</tr>
<tr>
<td>News</td>
<td><input type="radio" name="type" value="news"></td>
</tr>
<tr>
<td>Article</td>
<td><input type="radio" name="type" value="articles"></td>
</tr>
</table>
<table>
<tr>
<td><input type="submit"></td>
</tr>
</table>
</form>
</body>
</html>
And the upload.php:
<?php
mysql_connect('localhost', 'root');
mysql_select_db('documentation');
$title = $_POST['title'];
$article = $_POST['article'];
$type = $_POST['type'];
$author = $_POST['by'];
$articlenum = $_POST['articleNo'];
$add_art = addslashes($article);
$add_title = addslashes($title);
$final = nl2br($add_art);
$date = date('Y-m-d');
$time = date('h:i:s');
$insert = mysql_query("INSERT INTO `".$type."` (`title`, `body`, `insert_time`, `insert_date`, `id`, `author`) VALUES ('$add_title', '$final', '$time', '$date', '$articlenum', '$author' )");
echo '<pre>';
var_dump($_POST);
echo '</pre>';
if($insert){
echo "Ok.";
}else{
echo "Nope.";
}
mysql_close();
?>
Simple.
You may need to actually create the databases and tables in PHP and then mysql_query() them to the server. Probably the easiest way.