Re: consulta insercion
| From: | Walter Llanos | Date: | Sun, 09 Feb 2003 01:19:57 +0000 |
| Subject: | Re: consulta insercion | ||
| References: | 1 | Groups: | php.general.es |
| Request: | Send a blank email to general-es+get-32150@lists.php.net to get a copy of this message | ||
<html>
<?php
error_reporting (0); //Puedes poner esto...
// o esto.
$email = $_POST["email"];
$submit = $_POST["submit"];
// -----
if($submit)
{
$db = mysql_connect("localhost","daniel","datagroup");
mysql_select_db("promoweb",$db);
$sql = "INSERT INTO promoweb (E_MAIL) VALUES ('$email')";
$result = mysql_query($sql);
echo "Thank you! Information entered.\n";
}
else
{
?>
<form method="post" action="input.php">
<ul>
<li><strong>E-mail:</strong>
<input name="email" type="Text" value="alguien@datagroup.com"
size="50">
</li>
</ul>
<p align="center"><br>
<input type="Submit" name="submit" value="Ingresar mail">
</p>
</form>
<?
}
?>
</html>