Jump to content

i need help re-doing my form!


shenagsandnags

Recommended Posts

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!

 

 

 

 

 

 

Link to comment
Share on other sites

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>

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.