Try this:
1. Create a tab-delimited file from Excel.
2. Upload this file to your server.
3. Create a MySQL table (CREATE table ...) - manually or with a PHP script.
4. Insert records in your table.
e.g.
$file = fopen(\"uploaded_file_path/TEXTFILE.txt\", \"r\");
while(!feof($file)) {
$line = fgets($file, 8092);
if ($line) {
$fields = explode(\"\\t\", $line);
//each field in a text file will become a field in MySQL table
$id = $fields[0];
$Product_id = $fields[1];
$Brand = addslashes($fields[2]);
$Sdescription = addslashes($fields[3]);
$Price = $fields[4];
$Weight = $fields[5];
$fields[6] = trim ($fields[6]); //get rid of spaces left and right
$Maincat = ucwords($fields[6]); //capitalize first letter of all words
$Maincat = addslashes($Maincat);
$fields[7] = trim ($fields[7]);
$Subcat = addslashes($fields[7]);
$Image = addslashes($fields[8]);
$Ldescription = addslashes($fields[9]);
$Accessory = addslashes($fields[10]);
$Warranty = addslashes($fields[11]);
// insert into YOUR table
$sql = \"INSERT INTO $tablename (id, Product_id, Brand, Sdescription, Price, Weight, Maincat, Subcat, Image, Ldescription, Accessory, Warranty)
VALUES (\'$id\',\'$Product_id\',\'$Brand\',\'$Sdescription\',\'$Price\',\'$Weight\',\'$Maincat\',\'$Subcat\',\'$Image\',\'$Ldescription\',\'$Accessory\',\'$Warranty\')\";
// create connection
$connection = mysql_connect(\"www.yoursite.com\",\"userid\",\"password\") or die (\"Couldn\'t connect to server.\");
// select database
$db = mysql_select_db(\"yourdb\", $connection) or die (\"Couldn\'t select database.\");
//execute SQL query and get result
$sql_result = mysql_query($sql,$connection) or die (\"Couldn\'t execute query.\");
I do it all the time. Next time, when you want to upload the same db again (with some changes), your script should delete it first (DELETE from YOURTABLE) and then insert new records.
And it\'s all in one script. 🙂
alex