$domain = "econbot.org"; // used to block external access to php
$referer = $_SERVER['HTTP_REFERER'];
if (!strpos($referer,$domain)) {die('I\'m sorry, direct access to the php file you requested is not allowed. Please access through the SEB web interface.');}
$host="localhost";
$username="econbot";
$password="C5G2Cpg9cUCxoDnT";
$database="oldsite";
mysql_connect($host,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query="SELECT * FROM educators";
$result=mysql_query($query);
$num=mysql_numrows($result);
mysql_close();echo " "; $i=0; while ($i < $num) { $type=mysql_result($result,$i,"type"); $name=mysql_result($result,$i,"name"); $institution=mysql_result($result,$i,"institution"); $department=mysql_result($result,$i,"department"); $address=mysql_result($result,$i,"address"); $city=mysql_result($result,$i,"city"); $state=mysql_result($result,$i,"state"); $postalcode=mysql_result($result,$i,"postalcode"); $country=mysql_result($result,$i,"country"); $tel=mysql_result($result,$i,"tel"); $fax=mysql_result($result,$i,"fax"); $email=mysql_result($result,$i,"email"); $webaddress=mysql_result($result,$i,"webaddress"); echo " $name, $email, $webaddress $institution $department $address $city, $state $postalcode $country Tel: $tel Fax: $fax Opportunity: $type "; $i++; } ?> |