34 lines
510 B
PHP
34 lines
510 B
PHP
<html>
|
|
<body>
|
|
<style>
|
|
body {
|
|
background-color: #3B5998;
|
|
}
|
|
</style>
|
|
|
|
<?php
|
|
|
|
$username = $_POST["username"];
|
|
|
|
$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";
|
|
|
|
echo "<br>";
|
|
$query = "Select * from contacts where username = {$username}";
|
|
|
|
print $query;
|
|
?>
|
|
|
|
</body>
|
|
</html>
|