I want to make a connection between a hypothetical form and database (not localhost).
I do not get an error. However, data are not inserted in the database. I try to use the following codes, but not sure where is the issue. Please consider I am very new to PHP and it is very like that I have missed somethings.
<!DOCTYPE html>
<html>
<body>
<form method="post" action="new.php">
A : <input type="text" name="X1" placeholder="Enter A" /><br />
B : <input type="text" name="X2" placeholder="Enter B" /><br />
C : <input type="text" name="Y1" placeholder="Enter C" /><br />
D : <input type="text" name="Y2" placeholder="Enter D" /><br />
<br></br>
<input type="submit" value="Submit" />
</form>
</body>
</html>
<?php
$dbhost = "db1109865_hf";
$X1 = "dbX1";
$X2 = "dbX2";
$Y1 = "dbY1";
$Y2 = "dbY2";
$dbname = "abc";
$conn = new mysqli($dbhost, $X1, $X2,$Y1,$Y2, $dbname) or die('Could not connect');
$db = mysql_select_db($dbname);
?>