Jump to content

[SOLVED] display chosen option onto another webpage


ma5ect

Recommended Posts

<form id="form1" name="form1" method="post" action="">
    <div align="center"><img src="mm_spacer.gif" alt="" width="35" height="1" border="0" />
          <table width="200">
            <tr>
              <td><label>
                
                <input type="radio" name="RadioGroup1" value="radio" id="RadioGroup1_0" />
              Enterprise System</label></td>
            </tr>
            <tr>
              <td><label>
                
                <input type="radio" name="RadioGroup1" value="radio" id="RadioGroup1_1" />
              Unix	          </label></td>
            </tr>
            <tr>
              <td><label>
                
                <input type="radio" name="RadioGroup1" value="radio" id="RadioGroup1_2" />
              Service management	          </label></td>
            </tr>
            <tr>
              <td><label>
                
                <input type="radio" name="RadioGroup1" value="radio" id="RadioGroup1_3" />
              Network admin	        </label></td>
            </tr>
            </table>
        </div>
  </form>

thisPage.html

 


<form method="post" action="nextPage.php">

<input type="text" name="txtInput" size="20" /><br />
<input type="submit" name="btnSubmit" value="Submit Data" />

</form>

 

nextPage.php

 


<?php

if ( isset($_POST['btnSubmit']) ){

   if ( !empty($_POST['txtInput']) ){
      $strInfo = $_POST['txtInput'];
   }else{
      $strInfo = "You didn't submit any data in the form field.";
   }

echo htmlentities($strInfo, ENT_QUOTES);

}

?>

 

this is the 1st page..this works

 

<form method="post" action="nextPage.php">

  <p align="center">
  <input type="text" name="txtInput" size="20" />
  <input type="submit" name="btnSubmit" value="Submit Data" />
  </p>
  <p align="center"> </p>
  <div align="center">
    <table width="200">
      <tr>
        <td><label>
          <div align="center">
            <input type="radio" name="RadioGroup1" value="radio" id="RadioGroup1_0" />
          Radio</div>
        </label></td>
      </tr>
      <tr>
        <td><label>
          <div align="center">
            <input type="radio" name="RadioGroup1" value="radio" id="RadioGroup1_1" />
          Radio</div>
        </label></td>
      </tr>
      <tr>
        <td><label>
          <div align="center">
            <input type="radio" name="RadioGroup1" value="radio" id="RadioGroup1_2" />
          Radio</div>
        </label></td>
      </tr>
      <tr>
        <td><label>
          <div align="center">
            <input type="radio" name="RadioGroup1" value="radio" id="RadioGroup1_3" />
          Radio</div>
        </label></td>
      </tr>
    </table>
  </div>
  <p align="center"><br />
      </p>
</form>

 

2nd page...cant get the options to display

 

<?php

if ( isset($_POST['btnSubmit']) ){

   if ( !empty($_POST['txtInput']) ){
      $strInfo = $_POST['txtInput'];
   }else{
      $strInfo = "You didn't submit any data in the form field.";
   
$_POST['RadioGroup1_0'];
$_POST['RadioGroup2_1'];
$_POST['RadioGroup3_2'];
$_POST['RadioGroup4_3'];
}
echo htmlentities($strInfo, ENT_QUOTES);

}

?>

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.