Ir para conteúdo
Fórum CódigoFonte.net
Entre para seguir isso  
xitomporto

ERRO NO CÓDIGO

Recommended Posts

<?php

$conecta = mysqli_connect("localhost", "lutasbah_atleta", "sampaio883653", "lutasbah_my_store");
           or die ('Error connecting to the database. ');
           
$first_name = $_POST['firstname'];
$last_name = $_POST['lastname'];
$email = $_POST['email'];

$query ="INSERT INTO mailing_list (first_name, last_name, email) " . "VALUES ('$first_name', '$last_name', '$email')";

mysqli_query($dbc, &query)
        or die ('Error querying the database');
        
echo 'Customer added. '. '' . '<a href="addemail.html">Click here to return to the main page.. </a>';

mysqli_close($dbc);

?>

*PODEM EM AJUDAR A ACHAR O ERRO? QUEBREI A CABEÇA AQUI MAIS NAO CONSEGUI RESOLVER.

Compartilhar este post


Link para o post
Compartilhar em outros sites

<?php

$conecta = mysqli_connect("localhost", "lutasbah_atleta", "sampaio883653", "lutasbah_my_store"); // esse ponto e virgula aqui
           or die ('Error connecting to the database. ');
           
$first_name = $_POST['firstname'];
$last_name = $_POST['lastname'];
$email = $_POST['email'];

$query ="INSERT INTO mailing_list (first_name, last_name, email) " . "VALUES ('$first_name', '$last_name', '$email')";

mysqli_query($dbc, &query) //e esse & em vez de $
        or die ('Error querying the database');
        
echo 'Customer added. '. '' . '<a href="addemail.html">Click here to return to the main page.. </a>';

mysqli_close($dbc);

?>

Compartilhar este post


Link para o post
Compartilhar em outros sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Visitante
Responder

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Processando...
Entre para seguir isso  

×
×
  • Criar Novo...