0
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="utf8_general_ci">
<title> sistema de cadastro</title>
<link rel="stylesheet" href="_css/estilo.css">
</head>
<body>
<div class="container">
<nav>
<ul class="menu">
<a href="index.php"<li>Cadastro</li></a>
<a href="consultas.php" <li>Consultas</li></a>
</ul>
</nav>
<section>
<h1>Cadastro de Usuario</h1>
<hr><br><br>
<form method="post" action= "processa.php">
<input type="submit" value="Salvar" class="btn">
<input type="reset" value="Limpar" class="btn">
<br><br>
Nome <br>
<input type="text" name= "nome" class= "campo" maxlength="40" required autofocus> <br>
Email <br>
<input type="email" name="Email" class="campo" maxlength="50" required><br>
Profissao <br>
<input type="text" name="Profissao" class="campo" maxlength="40" required><br>
</form>
</section>
</div>
</body>
<html>
<?php
$hostname = "localhost";
$user = "root";
$password = "";
$database = "cadastro4";
$conexao = mysqli_connect($hostname, $user, $password, $database);
if (! $conexao){
echo "falha na conexao com o banco de dados";
<?php
include_once ("conexao.php");
$nome =$_POST ('$nome');
$email=$_POST ('Email');
$profissao=$_POST ('Profissao');
$sql = ("insert into usuarios3 (nome,email, profissao) values ('$nome', '$email', '$profissao')");
$salvar = mysqli_query ($conexao, $sql);
mysqli_close ($conexao);
?>
The error that appears:
Fatal error: Function name must be a string in C: wamp www CADASTRO2 processes.php on line 4
I see some syntax errors, but just in case: the
if
in the archiveconexao.php
does not have the same lock key?– Woss
It has yes, it is that at the time of selecting everything was out but it has yes lock on it, I was doing watching a tutorial on youtube followed everything he did only that in the video worked normal, already in mine appeared this syntax error
– Gabriel Lima
You can add the full error message to the question?
– Woss
Fatal error: Function name must be a string in C: wamp www CADASTRO2 processa.php on line 4 ... this error message is showing '
– Gabriel Lima
Variable
$_POST
indexnome
not in parenthesis, in brackets– Jefferson Quesado
In the title of the question you are presenting an error, in the other body, and explain nothing about them.
– Francisco
I am using Notepad+++ to edit everything, and in it when I put between conchetes appears more errors ( ( ! ) Notice: Undefined index: Name in C: wamp www CADASTRO2 processes.php on line 4 Call Stack # Time Memory Function Location 1 0.5960 133376 {main}( ) .. processes.php:0 )
– Gabriel Lima
The @Jeffersonquesado already told you where the mistake is. If his comment doesn’t suit you, please edit the question by placing details of your full code.
– Victor Stafusa
I managed to solve the problem, thanks for the personal help.!
– Gabriel Lima