help please

Hi… i’m a newby around here, n’ im trying to put a small blog up for school but it’s not working
what am i doing wrong here?
fealiin dummy :confused:


Menu Geral <?php //cheking fields if (! empty($_POST) AND (empty($_POST['nome']) OR empty ($_POST['password']) OR empty ($_POST['email']))){ header("Location: registar_utilizador.php"); exit; } //Ligar DB $ligacao = mysql_connect('localhost', 'root', '') or die ('Nao foi possível estabelecer ligacao com a base de dados'); //activar DB mysql_select_db('gestao_utilizadores', $ligacao) or die (mysql_error($ligacao)); $username = $_POST['nome']; $password = $_POST['password']; $email = $_POST['email']; $sql = "INSERT INTO utilizadores (nome_utilizador, palavra_passe, email) VALUES ('$username', '$password', '$email')"; $consulta = mysql_query($sql); if (($consulta) ! = 1){ //caso os dados n sejam inseridos com sucesso obriga a novo registo header("Location: registar_utilizador.php"); exit; } else { //menu.php is a file with simple html table as a header to be included in all pages along the site include(menu.php); echo"O registo foi efectuado com sucesso!

"; } ?>[/php]

Your problem is right here…
[php]if (($consulta) ! = 1){

That needs to be changed to…
if($consulta != 1){[/php]

Any other questions feel free to ask!

Sponsor our Newsletter | Privacy Policy | Terms of Service