1) Is it possible to have 1 php form that both inserts data into mysql and also uploads the actual files(pdf,jpeg) to the server? 2) Can there be a drop down select box in the form that is tied to the navigation of the site. Basically allowing me to select(rather than manually type) the data? I am a total newbie to PHP and MYSQL. Thanks.
1. Yes 2. Yes (would need to be database driven though) You can use the same page to insert the data into the database by using SERVER_SELF or simply # in the post action. Once the user hits submit you have your functions, first save the files then insert to the database. I'm guessing currently you are posting to a separate file something like user is on account/upload.php and it posts to account/uploaded.php Simply use the method above to do it on the same page and check if the user has submitted the form using something like: <?php if(isset($_POST['Submit'])) { // Add images // Insert into the database // Output success message } ?> // Show the page Code (markup):
Yes you can upload and insert data together in the same form by simple using one page form or can make another page specified in the action. You can tie url as a value in the dropdown list and add ajax to it so it can be viewed or redirected according to the value selected from the dropdown list