]*>", "", $string);
$string = ereg_replace("\n", "
\n", $string);
if (strlen($string)> $leng) $string = substr($string, 0, $leng);
$string= str_replace ("\n", "
", $string);
$string= str_replace ("\r", "", $string);
$string= str_replace ("'", "", $string);
$string= str_replace ("\"", "", $string);
}
function ShowSelectArea($l_area)
{
echo "Freelancers specializing in:\n";
echo "
\n";
}
include ("head.txt");
$area = $_GET['area'];
ClearInput($area, 4);
ShowSelectArea($area);
if ($area == "") {
}
else {
$dbuser = 'jacob';
$dbpass = 'paswyas';
$dbname = 'realty';
mysql_connect('127.0.0.1',$dbuser , $dbpass) or die ("Can't connect DB\n");
mysql_select_db($dbname) or die("Can't select database". mysql_error());
$sql = "SELECT * FROM `lancers` WHERE `area`='".$area."' ORDER BY `name` ASC";
$result = mysql_query ($sql);
if ( $result == FALSE ) {
die("sql error". mysql_error());
}
else {
$flag=0;
while(list($id, $name, $email,$phone,$web,$area1 ,$submitted) = mysql_fetch_row($result)){
if ($id=="") $id=" ";
if ($name=="") $name=" ";
if ($phone=="") $phone=" ";
if ($email=="") $email=" ";
if ($web == "" || $web == " ") {
$Details_S=""." ".$name." ". " ".$phone ." "." "."".$email." ";
}else
{
$Details_S=""." ".$name." ". " ".$phone ." "."".$web." "."".$email." ";
}
echo "".$Details_S."
\n";
$flag=1;
}
mysql_free_result($result);
if (!$flag) echo"The list is empty
\n";
}
}
include ("foot.txt");
?>