Jump to content

Add 'Hidden' Category To Form?


justlukeyou

Recommended Posts

I have created a form which allows people to add data to a database.  However, I want to replicate the form across several pages and give each page a category.

 

For example, if I have a website based on sport.  I have a page which enters information into the baseball category, a page which enters information into the ice hockey category, a page which enters information into the soccer category etc.

 

Can someone advise how I would do this?

Link to comment
Share on other sites

Although you can add a hidden value in a form, how would it know which category to insert into?

 

I would think using a form and letting them select a category would be the best way to go about this.

 

I would additionally make an uncategorized for anything not falling into your specific categories or if they didn't select anything.

 

http://www.w3schools.com/html/html_forms.asp

 

I think a dropdown would be the best way, takes less room on the page.

http://www.w3schools.com/html/tryit.asp?filename=tryhtml_select3

 

Then use the value from the POST or GET for your database insert of your category

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.