updating the searching
This commit is contained in:
@@ -1,8 +1,30 @@
|
||||
<html>
|
||||
<body>
|
||||
|
||||
First Name is <?php echo $_POST["fname"]; ?><br>
|
||||
Last Name is <?php echo $_POST["lname"]; ?>
|
||||
|
||||
<?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>
|
||||
|
||||
Reference in New Issue
Block a user