Input type radio onchange php

Author: olia Date of post: 19.06.2017

html - PHP Using value of radio button - Stack Overflow

So i've created 2 radio buttons for those options but i need to use the value of the radio button they select to display specific data.

This is my code so far. So instead of using the post data, how do I check to see which radio button the user has selected and display the appropriate question after?

It's not really the purpose to write someone's code, I know, but this might give you in extend, some idea why javascript is the best solution, and why PHP can't solve this.

PHP is a server-side script, and can't solve problems on the client-side, whereas javascript can ; You might try solving it with PHP, which will make it very ambiguous and javascript very sad.

Note that the javascript part would have been easier solved if you were using any kind of javascript framework like jquery or prototype. And finally, add a submit button and use javascript to remove it from the page. This way if something goes wrong with the javascript or if it's turned offpeople will still be able to use your website.

The button will be deleted before it even gets drawn on the screen, so it's as if it wasn't there for anyone with javascript.

Be sure to test the page with and without javascript. By posting your answer, you agree to the privacy policy and terms of service. Stack Overflow Questions Developer Jobs Documentation beta Tags Users. Sign up or log in to customize your list.

HTML: Submit form on radio button check - Stack Overflow

Tour Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn bse india trading holidays 2016 about Stack Overflow the company Business Learn more about hiring developers or posting ads with us. Log In Sign Up. Join the Stack Overflow Community. Stack Overflow is a community of 7.

Join them; it only takes a minute: PHP Using value of radio button Ask Question. Richard 77 8 48 Don't get that point really, sorry. Ok, and you do need the given option selected by the user the question after and be send with the form right? In other words, I'm not attending the college, then the question after appears and I select at option 2, 14 others ARE attending EXCLUDING me, then the submit button appears and I frankfurt stock exchange closed days send the form, correct?

Thank you very much, was extremely helpful. One more thing, when I clicked the button the content shows but the page doesn't scroll down so if you don't know what to expect you might miss it. What is it called when you want to force the page to scroll down to show the new content.

Is it called anything special?

input type radio onchange php

I can look it up and figure out how to do it input type radio onchange php if you just point me in the right direction. Again, thanks a lot for the help. Yes scrolling to bottom, first, get to know a javascript framework jquery or prototype stockmarketfunding trading school, this makes it more cross-browser compatible.

In javascript you could use something like window. Second, you do not have to work with display: Nothing about code but i could use a good opinion. Is there anything more aesthetically pleasing i can do rather than just blast them with textboxes to fill out? You need to add an id to your form tag, so that javascript can find it easily. You need an "onchange" event on the radio buttons, to submit the form whenever anything changes. Here's the things you need to add to your code: So instead of using javascript, can i just have the onchange call a php function that then notes which radio button is selected.

If so, any hints on how to go about that exactly? The code you've got should pretty much work with the code in my answer. The advantage of my answer over dbf's one is mine will still work when javascript is disabled or broken.

You should probably try both, learn how each one works, and then decide what to do. Sign up or log in StackExchange. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name.

jQuery change event

Stack Overflow works best with JavaScript enabled. Thank you php html post radio-button share.

php - Javascript - Radio Button onChange - Stack Overflow

Um, could you please explain why it isn't possible for the selects to be in the form? MathOverflow Mathematics Cross Validated stats Theoretical Computer Science Physics Chemistry Biology Computer Science Philosophy more 3. Meta Stack Exchange Stack Apps Area 51 Stack Overflow Talent.

inserted by FC2 system