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
[php]
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]