31 lines
485 B
PHP
31 lines
485 B
PHP
<html>
|
|
<body>
|
|
|
|
|
|
<?php
|
|
|
|
$fname = $_POST["fname"];
|
|
$lname = $_POST["lname"];
|
|
|
|
$servername = "localhost";
|
|
$username = "web";
|
|
$password = "Password456";
|
|
|
|
// Create connection
|
|
$conn = new mysqli($servername, $username, $password);
|
|
|
|
// Check connection
|
|
if ($conn->connect_error) {
|
|
die("Connection failed: " . $conn->connect_error);
|
|
}
|
|
echo "Connected successfully";
|
|
|
|
$query = "Select * from contacts where fname = " + $fname + " and lnam = " + $lname;
|
|
|
|
print $query;
|
|
|
|
?>
|
|
|
|
</body>
|
|
</html>
|