Michael_zz Posted March 1, 2010 Share Posted March 1, 2010 Hiiiiiii php coders I'm trying to make a gallery script that have 2 sides .. control panel and a public area using php and mysql database .. my problem now is how to make a 'smart' form in the control panel area that can extend it's input fields so that users can add many photos at once I mean preforming many queries at once all dumping at the same table , but with dynamically set variables ( like $something = $_POST['something'] ) .. hope you get the point :-\ .. I've googled about it but couldn't find anything useful enough thanks in advance Quote Link to comment Share on other sites More sharing options...
ferdi Posted March 1, 2010 Share Posted March 1, 2010 How do you mean by a "smart" form, and also what do you mean by adding photo's? If you are talking about uploading photo's, and then sending the pic's data to the database, then you can just use a normal upload form and then loop the FILES global and do it that way. more on that here... If your talking about editing the values already held in the database, again a simple loop will do, just select the column names and populate a form with the values. Quote Link to comment Share on other sites More sharing options...
Michael_zz Posted March 1, 2010 Author Share Posted March 1, 2010 Hiii ferdi .. thanks for replying sorry for being not clear enough .. but in other words I want a button , when pressed , generate a bit of php code that will display new fields beside the ones already present in the form .. I want to use this code to insert the new text fields .. <input type="text" name="title[]" value="" id="title" > this code will returrn an array containing all variables of the "title" text field .. so I want some code that can dynamically make these new fields via clicking a button or something .. thanks for your help , I appreciate that Quote Link to comment Share on other sites More sharing options...
Michael_zz Posted March 2, 2010 Author Share Posted March 2, 2010 Ok solved .. found better way to do it gonna share the script after finishing Quote Link to comment 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.