<?
//the example of inserting data with variable from HTML form
//input.php
mmysql_connect("userdb1","1039862_QmG","yJksQAtjWml2CF");//database connection
mysql_select_db("1039862_QmG");
$name_animal=$_POST['name_animal'];
$DOB=$_POST['DOB'];
$species=$_POST['species'];
$type=$_POST['type'];
$fk_Id_client=$_POST['fk_Id_client'];
$fk_id_deskstaff=$_POST['fk_id_deskstaff'];
//inserting data order
$order = "INSERT INTO Animal (name_animal,DOB,species, type,fk_Id_client,fk_id_deskstaff)
VALUES ('$name_animal','$DOB','$species','$type','$fk_Id_client','$fk_id_deskstaff')";
//declare in the order variable
$result = mysql_query($order); //order executes
if($result){
echo("<br>Input data is succeed");
} else{
echo("<br>Input data is fail");
}
?>
<?
//the example of inserting data with variable from HTML form
//input.php
mmysql_connect("userdb1","1039862_QmG","yJksQAtjWml2CF");//database connection
mysql_select_db("1039862_QmG");
$name_animal=$_POST['name_animal'];
$DOB=$_POST['DOB'];
$species=$_POST['species'];
$type=$_POST['type'];
$fk_Id_client=$_POST['fk_Id_client'];
$fk_id_deskstaff=$_POST['fk_id_deskstaff'];
//inserting data order
$order = "INSERT INTO Animal (name_animal,DOB,species, type,fk_Id_client,fk_id_deskstaff)
VALUES ('$name_animal','$DOB','$species','$type','$fk_Id_client','$fk_id_deskstaff')";
//declare in the order variable
$result = mysql_query($order); //order executes
if($result){
echo("<br>Input data is succeed");
} else{
echo("<br>Input data is fail");
}
?>
Fatal error: Uncaught Error: Call to undefined function mmysql_connect() in /in/P6oql:4
Stack trace:
#0 {main}
thrown in /in/P6oql on line 4
Process exited with code 255.