PHP Code:
include('includes/connect.php');
$id = mysql_real_escape_string($id);
echo $id;
if (empty($id))
{
header ('Location: directory_listings.php');
$id = "";
}
$sql2="SELECT * FROM `numbers` WHERE `id` = '".$id."'";
$result2=mysql_query($sql2);
if (!$result2) die('Invalid query: ' . mysql_error());
while ($row2 = mysql_fetch_array($result2, MYSQL_ASSOC))
{
$number = $row2["number"];
}
$number = urlencode("$number");
header ("Location: facetime://$number");
?>
However the problem exists because $number can be a number or an email address. and if it is an email address only the @wotever.com is shown. not the bit beforehand which I find odd because I would of thought it would drop that bit. anyways any help will be greatly appreciated.
|