note 106947 added to features.connection-handling
| From: | kuky at osu1 dot php dot net | Date: | Tue, 20 Dec 2011 07:50:29 +0000 |
| Subject: | note 106947 added to features.connection-handling | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-185176@lists.php.net to get a copy of this message | ||
this is hoe you canconnect and add elements in a table
<?php
include("conectare.php");
//echo "$_POST[nume]";
//echo $prenume,$nume,$an,$grupa;
$sql="INSERT INTO datepers (Nume,Prenume,An,Grupa) values
('".$_POST['nume']."','".$_POST['prenume']."','".$_POST['an']."','".$_POST['grupa']."')";
$result=mysql_query($sql);
if($result)
echo "Inregistrarea s-a realizat!";
else
echo "Inregistrarea nu s-a realizat!!";
}
//}
}
if(!empty($_GET['eroare'])){
$era=$_GET['eroare'];
echo "Aveti urmatoarele erori: <br>";
echo $era;
echo $nume;
}
?>
<html>
<head>
<title> Inserare </title>
</head>
<body>
<h1>Formular de inserare in tabela DatePers</h1>
<h3>
<form method="POST" action="">
<p> NUME: <input type="text" name="nume" >
<p> Prenume: <input type="text" name="prenume">
<p> An: <input type="text" name="an">
<p> Grupa: <input type="text" name="grupa">
<p> <input type="submit" name="submit"
value="Insert"></p>
</form>
</h3>
<p><a href="index.html">Index</a></p>
</body>
<html>
----
Server IP: 69.147.83.197
Probable Submitter: 82.137.15.55
----
Manual Page -- http://www.php.net/manual/en/features.connection-handling.php
Edit -- https://master.php.net/note/edit/106947
Del: integrated -- https://master.php.net/note/delete/106947/integrated
Del: useless -- https://master.php.net/note/delete/106947/useless
Del: bad code -- https://master.php.net/note/delete/106947/bad+code
Del: spam -- https://master.php.net/note/delete/106947/spam
Del: non-english -- https://master.php.net/note/delete/106947/non-english
Del: in docs -- https://master.php.net/note/delete/106947/in+docs
Del: other reasons-- https://master.php.net/note/delete/106947
Reject -- https://master.php.net/note/reject/106947
Search -- https://master.php.net/manage/user-notes.php