aaronrb Posted April 23, 2006 Share Posted April 23, 2006 Helloi would liek to know if this is the correct way to work on my project before i spend loads of time working on it and it doesnt work. i woudl like to create a huge list so that me and my friends can add the films that we own.i would liek the first page to have a text box or a drop down menu so that they can select how many films they wanna add at any one time.and then it will move on to the next page with that desired amount of textboxes.now the way that i would image this was done, was to use a foeeach statement.would i be right in saying this??and also if this is the way, as i have never used this before how would i go about adding it to mysql db.thanks in advance.RegardsA Quote Link to comment Share on other sites More sharing options...
shimano55 Posted April 23, 2006 Share Posted April 23, 2006 Well a for statement would make more sense for this situation.[code]$numBoxs = $_POST['boxes'];for ($i=1;$i<=$numBoxes;$i++) {echo "<textarea name='box".$i."' rows=5 cols=50></textarea><br />";}[/code]This would make the number of text boxes and have them named box1,box2,box3,etc.As for adding them to a mysql database, that depends on how your database is built.-shimano55 Quote Link to comment Share on other sites More sharing options...
aaronrb Posted April 24, 2006 Author Share Posted April 24, 2006 thanks for that, adding them to database, i would liek tthe name of hte film, an autonumber which will be the film number, and the catergory of the film. 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.