Files
WMU-CS4430-Project/var/www/acceptFriend.php
Logan McInnis 0f7bf31a62 did stuff
2019-12-02 18:36:54 -08:00

28 lines
564 B
PHP

<!DOCTYPE html>
<html>
<body>
<?php
$servername = "localhost";
$username = "web";
$password = "Password456";
$dbname = "computer";
// Create connection
$conn = mysqli_connect($servername, $username, $password, $dbname);
// Check connection
if (!$conn)
{
die("Connection failed: " . mysqli_connect_error());
}
$sql = "INSERT INTO FriendList VALUES user1, argv[0], true";
$result = mysqli_query($conn, $sql);
$sql = "UPDATE FriendList SET confirm = true WHERE username = argv[0] and friend = user1";
$result = mysqli_query($conn, $sql);
?>
</body>
</html>