HTML Form Options

Place for questions and answers for all newcomers and new coders. This is a free for all forum, no question is too stupid and to noob.
Post Reply
User avatar
MikeD
Posts: 294
Joined: Thu Sep 08, 2011 4:28 am

HTML Form Options

Post by MikeD »

Probably something simple, but in my game I've been asked to keep options selected.

Such as when choosing a dungeon and level Ex Magic Level 7. It saves those options the default.

I know there is a way to do it, i've seen it on various sites, however I can't find anything when I google it. Any help would be appreciated.
User avatar
MikeD
Posts: 294
Joined: Thu Sep 08, 2011 4:28 am

Re: HTML Form Options

Post by MikeD »

bump
User avatar
Chris
Posts: 1581
Joined: Wed Sep 30, 2009 7:22 pm

Re: HTML Form Options

Post by Chris »

Could you give us more detail by what you mean? A link, visual representation or maybe some sort of code.
Fighting for peace is declaring war on war. If you want peace be peaceful.
User avatar
hallsofvallhalla
Site Admin
Posts: 12026
Joined: Wed Apr 22, 2009 11:29 pm

Re: HTML Form Options

Post by hallsofvallhalla »

$item = $_POST['item'];
<form option....
<option selected='$item'.....
User avatar
MikeD
Posts: 294
Joined: Thu Sep 08, 2011 4:28 am

Re: HTML Form Options

Post by MikeD »

hallsofvallhalla wrote:$item = $_POST['item'];
<form option....
<option selected='$item'.....
YES!!!! Thank you, can't believe it's that simple. This has been bugging me for awhile haha.
Post Reply

Return to “Beginner Help and Support”