Advertisement
Guest User

Untitled

a guest
Aug 13th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. <?php
  2.  
  3. $dbuser="pawph0_acend";
  4. $dbpass="MW396th7";
  5. $dbname="pawph0_drdish"; //the name of the database
  6. $chandle = mysql_connect("localhost", $dbuser, $dbpass)
  7. or die("Connection Failure to Database");
  8. mysql_select_db($dbname, $chandle) or die ($dbname . " Database not found. " . $dbuser);
  9.  
  10. $dish = $_POST['dish'];
  11. $zip = $_POST['zip'];
  12. $zip1 = "XX";
  13. $zip2 = $zip . $zip1;
  14.  
  15. $query = "SELECT * FROM Sheet1 WHERE zip=\"$zip2\" AND dish=\"$dish\" ";
  16. $result = mysql_query($query);
  17.  
  18. echo "<head></head>
  19. <body>";
  20. echo '<form method="post">
  21.  
  22. <p><h3>Dish Network Satellite Angles</h3></p>
  23. <p>Directions: </p>
  24. <p>1. Select dish type <br /></p>
  25. <p>2. Put in the first 3 digits of the zipcode</p>
  26. <hr />
  27. Dish: <br />
  28.  
  29.  
  30. <select name="dish">
  31. <option>1000.2</option>
  32. <option>1000.4</option>
  33. </select>
  34. <br />
  35.  
  36. Enter 1st 3 digits of Zipcode: <br />
  37.  
  38. <input type="text" maxlength="5" name="zip" id="textfield"><br />
  39. <input type="submit" name="button" id="button" value="Submit">
  40. </form>
  41. ';
  42.  
  43. while ($row = mysql_fetch_assoc($result)) {
  44. echo "Elevation: ";
  45. echo $row['el'];
  46. echo " Azimuth: ";
  47. echo $row['az'];
  48. echo " Skew: ";
  49. echo $row['sk'];
  50. }
  51.  
  52.  
  53.  
  54. echo " </body>";
  55. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement