Advertisement
ll6068

RadioButton Woes

Jul 18th, 2015
668
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.89 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3.  
  4. <head>
  5.     <meta charset="utf-8">
  6.     <title>9 Block Plotter</title>
  7.     <meta name="description" content="Hello World">
  8.     <!-- Latest compiled and minified CSS -->
  9.     <link rel="stylesheet" href="./css/bootstrap.min.css">
  10.     <!-- Optional theme -->
  11.     <link rel="stylesheet" href="./css/bootstrap-theme.min.css">
  12. <style>
  13. .form-group{
  14. padding: 10px;
  15. }
  16. body {
  17.     padding-top: 65px;
  18. }
  19. </style>
  20. </head>
  21.  
  22. <body>
  23. <?php if ($_SERVER['REQUEST_METHOD'] == 'GET') { ?>
  24.  
  25. <div class="container">
  26.             <form action="<?php echo htmlentities($_SERVER['SCRIPT_NAME']) ?>" method="post">  
  27.                 <div class="form-group  has-success has-feedback">
  28.                     <p class="help-block">Create a 9 block Diagram, copy from spreadsheet</p>
  29.                     <div class="col-md-12">
  30.                         <textarea  rows="18" class="form-control" id="Desc" name="Desc" placeholder="Bill Kumagai 3 3" value=""></textarea>
  31.                           <!-- Radio Buttons  -->
  32.                         <label class="radio-inline"><input type="radio" id="optradio1" name="optradio1">Font size 8</label>
  33.                          <label class="radio-inline"><input type="radio" id="optradio2" name="optradio2" checked>Font size 10</label>
  34.                          <label class="radio-inline"><input type="radio" id="optradio3" name="optradio3">Font size 12</label>
  35.                          <label class="radio-inline"><input type="radio" id="optradio4" name="optradio4">Font size 14</label>
  36.                        
  37.                     </div>
  38.               </div>
  39.  
  40. <input id="submit" name="submit" type="submit" value="Send" class="btn btn-primary">
  41. </form>
  42.  </div>
  43.  <div class="container">
  44.  
  45.  
  46.  </div>  
  47.  
  48.  
  49.  
  50.  
  51.     <!-- Latest compiled and minified JavaScript -->
  52.  
  53.  <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
  54.  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
  55. </body>
  56. </html>
  57.  
  58.  
  59. <?php } else {
  60. echo "<!DOCTYPE html>";
  61. echo "<html><body>";
  62.  
  63.   echo "<div>";
  64.   $em=$_POST['Desc'];
  65.   // None of these are found
  66.   $ex=$_POST['optradio1'];  echo "<br/> 1: ".$ex;
  67.   $ex=$_POST['optradio2'];  echo "<br/> 2: ".$ex;
  68.   $ex=$_POST['optradio3'];  echo "<br/> 3: ".$ex;
  69.   $ex=$_POST['optradio4'];  echo "<br/> 4: ".$ex;
  70.    echo "<center>";
  71.   echo "<H3>9 Block Associate Plotter</H3>";
  72.    echo "</center>";
  73.   echo "</div>";
  74.  
  75. //Send a generated image to the browser
  76. //create_image();
  77.  echo "<div><p><br/>";  
  78.  echo "<center>";
  79.  echo "<img height=\"650\" alt=\"Dynamically generated image\" src=\"img.php?app=".$em. "\" width=\"1000\">";
  80.  echo "</center>";
  81.  echo "</p></div><br/>";  
  82.  echo "<div class=\"container\">";
  83.  echo "<a href=\"imf.php\" class=\"btn btn-primary btn-md\" role=\"button\">Do It Again</a>";
  84.  echo "</div><br/>";
  85.  echo "</body></html>";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement