shage Posted November 6, 2009 Share Posted November 6, 2009 We have a form submission using ajax progress bar on upload, we want to submit the upload using php is that possible? Quote Link to comment https://forums.phpfreaks.com/topic/180505-form-submission/ Share on other sites More sharing options...
mikesta707 Posted November 6, 2009 Share Posted November 6, 2009 I don't see why not. Quote Link to comment https://forums.phpfreaks.com/topic/180505-form-submission/#findComment-952256 Share on other sites More sharing options...
shage Posted November 6, 2009 Author Share Posted November 6, 2009 <form name="uploadVideo" id="uploadVideo" method="post" enctype="multipart/form-data" target="_self" action="/upload/video"> <input type="hidden" name="MAX_FILE_SIZE" value="209715200" /> <input type="hidden" name="UPLOAD_IDENTIFIER" id="UPLOAD_IDENTIFIER" value="1593771892_1257471305" /> <input type="hidden" name="video_upload_started" /> <div class="separator"> <label for="upload_video_title">Title:</label> <input name="video_title" type="text" value="" id="upload_video_title" class="large" /><br /> <span id="video_title_error" class="error" style="display: none;">Please enter the video title!</span> </div> <div class="separator"> <label for="upload_video_keywords">Tags:</label> <textarea name="video_keywords" id="upload_video_keywords"></textarea><br /> <span class="expl">Enter one or more tags, separated by spaces.</span><br /> <span id="video_tags_error" class="error" style="display: none;">Please enter video tags (separated only by spaces)!</span> </div> <div class="separator"> <label for="upload_video_category">Category:</label> <select name="video_category" id="upload_video_category"> <option value="0" selected="selected">-----</option> <option value="6">Soccer</option> </select><br /> <span id="video_category_error" class="error" style="display: none;">Please select a category!</span> </div> <div class="separator"> <label for="upload_video_file">File:</label> <input name="video_file" type="file" id="upload_video_file" /><br /> <span id="video_file_error" class="error" style="display: none;">Please selected a video file!</span> <span id="video_file_ext_error" class="error" style="display: none;"></span> </div> <br> <div class="separator"> <label for="upload_video_anonymous_no">Anonymous:</label> <input name="video_anonymous" type="radio" value="no" id="upload_video_anonymous_no" class="radio" checked="checked" /> <span class="radio">No - use my profile name!</span><br> <label for="upload_video_anonymous_yes"> </label> <input name="video_anonymous" type="radio" value="yes" id="upload_video_anonymous_yes" class="radio" /> <span class="radio">Yes - anonymous!</span> </div> <div class="separator"> <label for="upload_video_privacy_public">Privacy:</label> <input name="video_privacy" type="radio" value="public" id="upload_video_privacy_public" class="radio" checked="checked" /> <span class="radio">Public - anybody can see this video!</span><br> <label for="upload_video_privacy_private"> </label> <input name="video_privacy" type="radio" value="private" id="upload_video_privacy_private" class="radio" /> <span class="radio">Private - only your friends can see this video!</span> </div> <br> <div id="upload_loader" style="display: none;"> <img src="/templates/frontend/default/images/ajax-loader.gif"> </div> <div id="upload_status" style="display:none;"> <div id="upload_progress"><div class="bar" style="width: 0;"> </div></div> <div class="upload_info"> <div id="upload_time"></div> <div id="upload_size"></div> <div class="clear"></div> </div> </div> <div id="upload_message" style="display: none;"></div> <div class="separator"> <label for="upload_video_submit"> </label> <input name="submit_upload_video" type="button" id="upload_video_submit" value="Upload Video" class="button" /> </div> </form> some reason if i try to post using the vars it gives me nothing with curl, since curl and js dont get along atleast as much as i know Quote Link to comment https://forums.phpfreaks.com/topic/180505-form-submission/#findComment-952264 Share on other sites More sharing options...
shage Posted November 6, 2009 Author Share Posted November 6, 2009 holy grail Quote Link to comment https://forums.phpfreaks.com/topic/180505-form-submission/#findComment-952302 Share on other sites More sharing options...
Thauwa Posted November 6, 2009 Share Posted November 6, 2009 If its just plain text, there is no reason as to why you should not use MySql, but if it is files that you want uploading, you have to change your server settings to 777 or xxx and use php to upload the file to a directory in your server, and then insert the link automatically generated using php to MySql for referring. Go and see about.com. Search for 'Uploading Files'. I hope that this helps, Thanks Quote Link to comment https://forums.phpfreaks.com/topic/180505-form-submission/#findComment-952418 Share on other sites More sharing options...
shage Posted November 7, 2009 Author Share Posted November 7, 2009 its upload form to say imageshack etc, we are trying to upload family albums, so no access to db, and the enctype="multipart/form-data" i think is messing it up Quote Link to comment https://forums.phpfreaks.com/topic/180505-form-submission/#findComment-953197 Share on other sites More sharing options...
Thauwa Posted November 8, 2009 Share Posted November 8, 2009 I did not understand your statement Quote Link to comment https://forums.phpfreaks.com/topic/180505-form-submission/#findComment-953566 Share on other sites More sharing options...
shage Posted November 8, 2009 Author Share Posted November 8, 2009 thanks for trying Quote Link to comment https://forums.phpfreaks.com/topic/180505-form-submission/#findComment-953735 Share on other sites More sharing options...
mikesta707 Posted November 8, 2009 Share Posted November 8, 2009 the enctype has to be multipart/form-data for file uploads to work. I don't quite get what your problem is though. do you have any code that is giving you problems? you said you are using Curl. Why are you trying to use Curl. is the upload happening on your server or someone else's Quote Link to comment https://forums.phpfreaks.com/topic/180505-form-submission/#findComment-953741 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.