Register php issue
<p>im having a problem i want to regist clients, i think the code its allright but it showing some errors like this. can you help me and tell me why?</p>

<pre><code>enter code here

&lt;?php

error_reporting(E_ALL ^ E_NOTICE);

$bd_vincoseagulhadata = "localhost";
$bd = "root";
$bd_pw = "";
$db = "vincoseagulhadata";

$bd_con = mysql_connect("$bd_vincoseagulhadata", "$bd", "$bd_pw", "$db") 
or die("Erro!");

mysql_select_db("$db", $bd_con);

$nome=(!isset($_POST['nome']));
$username=(!isset($_POST['username']));
$password=(!isset($_POST['password']));
$nomeLength=strlen($nome); 
$usernameLength=strlen($username); 
$passwordLength=strlen($password);

$nome = stripslashes($nome);
$username = stripslashes($username);
$password = stripslashes($password);
$nome = stripslashes($nome);
$username = mysql_real_escape_string($username);
$password = mysql_real_escape_string($password);

if ($usernameLength &gt;=6 &amp;&amp; $usernameLenght &lt;=10)    
{
$errorMessage="";
}
else
{
$errorMessage=$errorMessage ."O username tem de ter entre 6 e 10 caracteres"." &lt;br&gt;";

if ($passwordLength &gt;=6 &amp;&amp; $passwordLength &lt;=10) 
{
$errorMessage="";
}
else
{
$errorMessage=$errorMessage ."A password deve ter até 8 caracteres"."&lt;br&gt;";
}

$query=mysql_query("SELECT * FROM tb_funcionarios WHERE username='$username' and password='$password'");

$result=mysql_query($query);

$num_rows = mysql_num_rows($result);

if ($num_rows&gt;0) 
{
echo "o username que escolheu já existe";
}
else
{
$query = "INSERT INTO tb_funcionarios (nome, username, password) VALUES (
'$_POST[nome]',
'$_POST[username]',
'$_POST[password]'
)";;

$result = mysql_query($query) or die (mysql_error());

echo " Thanks for registration";
}

mysql_query($query);
mysql_close($bd_con);

?&gt;
</code></pre>

<p><strong>And the error that shows me its some code lines and i cant figured it out why it happens:</strong></p>

<p>0) { echo "Pedimos desculpa mas o nome de utilizador que introduziu já foi utilizado! Introduza um novo!"; unset($username); exit(); } $query=mysql_query("INSERT INTO funcionarios (nome, username, password)"; VALUES('$nome', '$username','$password')”; mysql_query($query) or die(mysql_error()); mysql_close();echo "Você foi registado com sucesso!"; ?></p>
