• 0
Sign in to follow this  

Ajuda por favor?


Primeira mente obrigado pelo seu tempo

Olha queria saber o que esta acontecendo nesse meu fonte, parece perfeito mas não funciona

quanto eu clico no botao ENVIAR nada acontece.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<form action="gravar.php" method="post">
Nome:<input type="text" name="nome"/>
<input type="submit"/>
E aqui esta a parte do php
$db_local ="localhost:3306";
$db_login ="root";
$db_senha ="";

$con = mysql_connect($db_local, $db_login, $db_senha);


        die ('Failed to connect to server: ' . mysql_error());

$nome = $_POST['nome'];

$sql="INSERT INTO users (NOME) VALUES ($nome)";

  die('Error: ' . mysql_error());
echo "1 record added";

Se alguém souber o que é e me informar eu agradeço


Share this post

Link to post
Share on other sites

1 answer to this question

Recommended Posts

Join the conversation

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

Answer this question...

×   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.

Sign in to follow this