***********
"); $q = explode("&",$_SERVER["QUERY_STRING"]); foreach ($q as $qi) { if ($qi != "") { $qa = explode("=",$qi); list ($key, $val) = $qa; if ($val) { $$key = urldecode($val); //echo "
1: $$key=$val"; } } } reset ($_POST); while (list ($key, $val) = each ($_POST)) { if ($val) { $$key = $val; //echo "
2: $$key=$val"; } } //echo("
***********
"); $db = "drupal"; $link = mysql_connect("localhost"); if (! $link) die("Couldn't connect to MySQL"); mysql_select_db($db , $link) or die("Couldn't open $db: ".mysql_error()); $id = (int) $id; $result = mysql_query("SELECT profile_values.uid, profile_values.value FROM profile_values WHERE profile_values.uid=$id AND (profile_values.fid=1 OR profile_values.fid=2 OR profile_values.fid=3 OR profile_values.fid=4 OR profile_values.fid=6 OR profile_values.fid=7 OR profile_values.fid=8 OR profile_values.fid=9 OR profile_values.fid=12 OR profile_values.fid=27 OR profile_values.fid=28) ORDER BY profile_values.uid DESC, profile_values.fid") or die("SELECT FROM profile_values Error: ".mysql_error()); $num_rows = mysql_num_rows($result); //$row = mysql_fetch_array($result); for($i = 1; $i <= $num_rows && $row = mysql_fetch_array($result); $i++) { $fname=$row[value]; $row = mysql_fetch_array($result, MYSQL_ASSOC); $lname=$row[value]; $row = mysql_fetch_array($result, MYSQL_ASSOC); $affiliation=$row[value]; $row = mysql_fetch_array($result, MYSQL_ASSOC); $address=$row[value]; $row = mysql_fetch_array($result, MYSQL_ASSOC); $city=$row[value]; $row = mysql_fetch_array($result, MYSQL_ASSOC); $state=$row[value]; $row = mysql_fetch_array($result, MYSQL_ASSOC); $zip=$row[value]; $row = mysql_fetch_array($result, MYSQL_ASSOC); $phone=$row[value]; $row = mysql_fetch_array($result, MYSQL_ASSOC); $web=$row[value]; $row = mysql_fetch_array($result, MYSQL_ASSOC); $bio=$row[value]; $row = mysql_fetch_array($result, MYSQL_ASSOC); $title=$row[value]; } if($bio == "") { $bio="Bio is not available yet. Please, check again later."; } else { //$bio = str_replace("\n", "
", "$bio"); } if($title == "") { $title = ""; } else { $title = "   $title"; } if($address == "" || $address == "N/A") { $address = ""; } else { $address = "   $address"; } if($zip == "" || $zip == "00000") { $zip = ""; } if($city == "" || $city == "N/A") { $city = ""; $state = ""; } else { $city = "   $city, $state $zip"; } if($phone == "" || $phone == "000-000-0000") { $phone = ""; } else { $phone = "   Phone: $phone"; } if($web == "") { $web = ""; } else { $web = "   Web: $web"; } echo(" ...where effective SBIR participation enables new business opportunities
$title $address $city $phone $web
    $fname $lname
    $affiliation

$bio


"); ?>