Code: Select all
$cliente = $_POST['listaclientes'];
$servico = $_POST['listaservicos'];
$idcliente = mysql_query("SELECT id FROM clientes WHERE nome='{$cliente}'");
$idservico = mysql_query("SELECT id FROM servicos WHERE nomeservico='{$servico}'");
echo $idcliente;
echo $idservico;The result of this query:
The result would be another IDs, by the way this Ids doesn´t exist!Resource id #3Resource id #4