<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<?php
$db=mysql_connect("localhost","root","");
if(!$db)
{
echo"can not connect";
exit;
}
$db_selected=mysql_select_db("user",$db);
if(!$db_selected)
{
died("can not connect".mysql_error());
}
echo "success connect to database";
echo"</br>";
echo "Show database";
echo"</br>";
$result=mysql_query("select * from admin");
if(mysql_num_rows($result)<>0)
{
while($row=mysql_fetch_row($result))
{
print_r($row);
echo"</br>";
}
}
echo "insert database";
echo"</br>";
if(isset($_POST['insert']))
{
$name=$_POST['name'];
$age=$_POST['age'];
$phone=$_POST['phone'];
$sql=mysql_query("insert into admin values ( '$name','$age','$phone')");
}
mysql_close($db);
?>
</head>
<body>
<form id="form1" name="form1" method="post" action="">
<label>
<input type="text" name="name" id="name" />
</label>
<label>
<input type="text" name="age" id="age" />
</label>
<label>
<input type="text" name="phone" id="phone" />
</label>
<label>
<input type="submit" name="insert" id="insert" value="insert" />
</label>
</form>
</body>
</html>
<?php
use Aura\Sql\ExtendedPdo;
$pdo = new ExtendedPdo(
'mysql:host=localhost;dbname=test',
'username',
'password',
array(), // driver options as key-value pairs
array() // attributes as key-value pairs
);
?>)
but in 2.4.2 (source) doesn't have Aura folder or sql folder (that you use in your code)
and i wonder where do you type this code (what folder contain file which contain this code).
I have a code as above that i give you( I ran and it success) but i wonder
How do I use Aura frame work for that? and how i use aura.sql for my code?
Thank you very much