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
https://forums.phpfreaks.com/topic/229778-add-hidden-category-to-form/
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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.