???
I have some code which i rectified to upload images to server with file path in database.
and view them in table, it works fine (However only 1 image to 1 record)
But what i want to achieve is the following: I want to create a property listings database ,where i can upload say 4 images + the house information on the same upload form ,which is connected to 1 house.
Then run a query for instance by ,bedroom,garages,price etc then the 4 images for that house id must show in a table format for the client to view.
Here is the code 3 files
php_multiple_resize_mysql1.php
php_multiple_resize_mysql2.php
echo "Resize Successful.<br>";
//*** Insert Record ***//
$objConnect = mysql_connect("localhost","stilbaai_chris","chrisedit52") or die(mysql_error());
$objDB = mysql_select_db("stilbaai_imageamana");
$strSQL = "INSERT INTO files ";
$strSQL .="(Thumbnails,FilesName) VALUES ('".$new_images."','".$_FILES["fileUpload"]["name"][$i]."')";
$objQuery = mysql_query($strSQL);
}
}
?>
View file
php_multiple_resize_mysql3.php
ShotDev.Com Tutorial <? $objConnect = mysql_connect("localhost","stilbaai_chris","chrisedit52") or die(mysql_error()); $objDB = mysql_select_db("stilbaai_imageamana"); $strSQL = "SELECT * FROM files"; $objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]"); ?> Files ID
|
Thumbnails
|
---|---|
<?=$objResult["FilesID"];?> |
"> " border="0"> |
Upload Image