0

Hello Guyz I have a question for you all hope you guyz will help me out.

Here I have created a form with dynamic values if the user select the radio button of no then a text box echo's here are the code which i created please correct me how will i do this.

<?php
    $yes = "<input type='radio' name='textfield1a' value='Yes' class='chk' />";
    $no  = "<input type='radio' name='textfield1a' value='No' class='chk' />";

    echo $yes . "Yes";
    echo $no  . "No" ;

    if($no==true){
        echo "<input type='text' name='textfield6' class='pw'>". "<br />" ; 
    } 
?>

Please let me know your suggessions

Thank You

3
Contributors
3
Replies
11
Views
2 Years
Discussion Span
Last Post by JorgeM
0

Thank you for your kind response but please confirm me whic data are you reffering on line 11 its ?>

0

i'm not a php developer, but regardless of the server side scripting...if you are processing this server side, you have to figure out what the user selected, correct? well... if the input/radio buttons are within a form, when the user submits the form, you have to collect that data server side.

I helped on a similar thread (instead of radio buttons, it was checkboxes), but the idea of looking at what was posted is the same. see if this thread helps clarify anything for you. There is a link to a working demo as well.

https://www.daniweb.com/web-development/php/threads/468203/checkboxes-passing-form-data-using-html-and-php

hope this helps.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.