thesprucegoose Posted October 30, 2008 Share Posted October 30, 2008 Hey all, I need help! This is my first PHP script, ever. I want to have someone upload an image (and eventually a title, description, and location data) and have that image automatically add to a separate web page. For example, an image from image_upload.php would be transferred to image_dump.html. <form enctype="multipart/form-data" action="http://voidinwarranties.com/php_test/dump.html" method="POST"> <!-- MAX_FILE_SIZE must precede the file input field --> <input type="hidden" name="MAX_FILE_SIZE" value="30000" /> <!-- Name of input element determines name in $_FILES array --> Send this file: <input name="userfile" type="file" /> <input type="submit" value="Send File" /> </form> that's my code, but it returns an error saying that dump.html isn't prepared to accept it. HELP! ~TSG Link to comment https://forums.phpfreaks.com/topic/130675-image-upload-help/ Share on other sites More sharing options...
crochk Posted October 30, 2008 Share Posted October 30, 2008 PHP is a little more complex than this, especially for files. For files, my reccomendation would be to process the information from the form, and save it to a database (MySQL). Then have the image_dump page get the data saved in the database and show it. Look here for more info: http://www.php-mysql-tutorial.com/upload-to-file-server.php Link to comment https://forums.phpfreaks.com/topic/130675-image-upload-help/#findComment-678109 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.