<?php
session_start();
if(strpos(strtolower($_SERVER['REQUEST_URI']), 'phpsessid') !== false)
{
  session_destroy();
  session_regenerate_id();
  session_start();
                              
}
include "../phpconfig/config.php";
include "../phpconfig/valida_login.php";
include "../phpconfig/slugfy.php";

$tel= trim($_POST['tel']);

$sel = mysql_query("SELECT * FROM empresas WHERE telefone LIKE '%$tel%'", $con) or die(mysql_error());

if(mysql_num_rows($sel)>0){

echo 2;


} else{

	echo 1;
}

