All pastes #924413 Raw Edit

qry_pos.php

public text v1 · immutable
·published 2008-03-01 09:39 UTC
rendered paste body
<?php 
// Set as xml
header('Content-Type: text/xml');

require_once('db_connect.php');
mysql_select_db( $database_eagle, $eagle );


//-------Search for Positions Information
$city = $_REQUEST['City'];
$query_pos = "SELECT name, city, state, link FROM Positions WHERE city = '" . $city . "' ORDER BY name";
$qry_pos = mysql_query( $query_pos, $eagle ) or die( mysql_error() );
$row_pos = mysql_fetch_assoc( $qry_state );


// Output the positions in XML format
echo "<Positions>";
while($row = mysql_fetch_array($qry_pos, MYSQL_ASSOC))
{
    echo "<pos>" . $row["name"] . "</pos>";
}