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>

Link to comment
Share on other sites

</pre>
<form id="form1" name="form1" method="post" action=""><

 

First, you have to include the page you're passing it to:

 

</pre>
<form id="form1" name="form1" method="post" action="your_page.php"><

 

 

 

Link to comment
Share on other sites

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);

}

?>

 

Link to comment
Share on other sites

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);

}

?>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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