shenagsandnags Posted February 5, 2011 Share Posted February 5, 2011 had a leak in my home which ruinned my pc but luckly i had most of my project and db info backed up on a stick but i didnt have my forms backed up! can someone please help me! the form was actually pretty basic but since i am still new too php simple things are still a challenge. (my db is based off 2 tables Movies,Categories) Movies: ID,Title,Category(FK),URL Categories: ID,Category so the first part was for entering movie info into my movies table while selecting a category from the categories table. ----------------------------------------------- Title: (txt field) Category: a dropdown/combo box that would list the categories from the categories table. URL: (txt field) and a sumbit button. like i said this was a pretty basic form. the second part showed a single list of all my movie titles, when i selected one i was able to change the category that the title was listed in, i dont know how to explain how it was setup but i am in such a rush to get this fixed and caught back up that i dont care how this next one works as long as it lets me do what i needed it too do. i also had another that let me add/delete categores in the categories table but i can deal with that another time and just manually enter it with myphpadmin when needed because i have to get the above asap.. i will be so greatful if anyone can help me get my stuff back on! Quote Link to comment https://forums.phpfreaks.com/topic/226775-i-need-help-re-doing-my-form/ Share on other sites More sharing options...
floridaflatlander Posted February 5, 2011 Share Posted February 5, 2011 Your form may look something like this, of course you also may have to change a few values here and there <form action="movie.php" method="post"> ( or form action="<?php echo $_SERVER['PHP_SELF']; ?>" ) <table class="table"> <tr> <td colspan="2"> <h1>Page Title</h1> </td> </tr> <tr> <td> <p>Title:</p> </td> <td> <p><input type="text" name="Title" size="20" maxlength="80" /></p> </td> </tr> <tr> <td> <p>URL:</p> </td> <td> <p><input type="text" name="url" size="20" maxlength="100" /></p> </td> </tr> <tr> <td> <p>Category:</p> </td> <td> <p><input type="text" name="category" size="20" maxlength="20" /></p> </td> </tr> <tr> <td colspan="2" align="right"> <input type="submit" name="submit" value="Enter" /> </td> </tr> </table> </form> Quote Link to comment https://forums.phpfreaks.com/topic/226775-i-need-help-re-doing-my-form/#findComment-1170213 Share on other sites More sharing options...
shenagsandnags Posted February 6, 2011 Author Share Posted February 6, 2011 sort of, it didnt have all those elements and such, tables etc. but if you leave me with just that code i will be lost. i know the actual form page itself is pretty simple. the 2 things that are really stopping me is i have no idea how to put the drop down box inside the form and make it pull the categories from the categories table and then the post.php i have no clue what the code was for it. Quote Link to comment https://forums.phpfreaks.com/topic/226775-i-need-help-re-doing-my-form/#findComment-1170534 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.