Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $dbuser="pawph0_acend";
- $dbpass="MW396th7";
- $dbname="pawph0_drdish"; //the name of the database
- $chandle = mysql_connect("localhost", $dbuser, $dbpass)
- or die("Connection Failure to Database");
- mysql_select_db($dbname, $chandle) or die ($dbname . " Database not found. " . $dbuser);
- $dish = $_POST['dish'];
- $zip = $_POST['zip'];
- $zip1 = "XX";
- $zip2 = $zip . $zip1;
- $query = "SELECT * FROM Sheet1 WHERE zip=\"$zip2\" AND dish=\"$dish\" ";
- $result = mysql_query($query);
- echo "<head></head>
- <body>";
- echo '<form method="post">
- <p><h3>Dish Network Satellite Angles</h3></p>
- <p>Directions: </p>
- <p>1. Select dish type <br /></p>
- <p>2. Put in the first 3 digits of the zipcode</p>
- <hr />
- Dish: <br />
- <select name="dish">
- <option>1000.2</option>
- <option>1000.4</option>
- </select>
- <br />
- Enter 1st 3 digits of Zipcode: <br />
- <input type="text" maxlength="5" name="zip" id="textfield"><br />
- <input type="submit" name="button" id="button" value="Submit">
- </form>
- ';
- while ($row = mysql_fetch_assoc($result)) {
- echo "Elevation: ";
- echo $row['el'];
- echo " Azimuth: ";
- echo $row['az'];
- echo " Skew: ";
- echo $row['sk'];
- }
- echo " </body>";
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement