From 36beca341f82f7f89cc5068f2575535d67ceca0c Mon Sep 17 00:00:00 2001 From: Bryan Date: Mon, 25 Nov 2019 13:24:32 -0500 Subject: [PATCH] updating the searching --- etc/nginx/conf.d/cs4430.conf | 6 +++--- var/www/messageSender.php | 13 +++++++++++++ var/www/nameSearch.php | 26 ++++++++++++++++++++++++-- var/www/search.php | 29 ----------------------------- var/www/usernameSearch.php | 26 +++++++++++++++++++++++++- 5 files changed, 65 insertions(+), 35 deletions(-) create mode 100644 var/www/messageSender.php diff --git a/etc/nginx/conf.d/cs4430.conf b/etc/nginx/conf.d/cs4430.conf index 4c0311c..1bea391 100644 --- a/etc/nginx/conf.d/cs4430.conf +++ b/etc/nginx/conf.d/cs4430.conf @@ -3,18 +3,18 @@ server { listen [::]:80; root /var/www/; - index index.html + landingPage landingPage.html server_name _; access_log /var/log/nginx/access.log; error_log /var/log/nginx/error.log; location / { - try_files $uri $uri/ /index.html =404; + try_files $uri $uri/ /landingPage.html =404; } location ~ \.php$ { include snippets/fastcgi-php.conf; fastcgi_pass unix:/run/php/php7.2-fpm.sock; } -} \ No newline at end of file +} diff --git a/var/www/messageSender.php b/var/www/messageSender.php new file mode 100644 index 0000000..d177c09 --- /dev/null +++ b/var/www/messageSender.php @@ -0,0 +1,13 @@ + + + + + + + + + diff --git a/var/www/nameSearch.php b/var/www/nameSearch.php index 2a73f98..decdfef 100644 --- a/var/www/nameSearch.php +++ b/var/www/nameSearch.php @@ -1,8 +1,30 @@ -First Name is
-Last Name is + +connect_error) { + die("Connection failed: " . $conn->connect_error); +} +echo "Connected successfully"; + +$query = "Select * from contacts where fname = " + $fname + " and lnam = " + $lname; + +print $query; + +?> diff --git a/var/www/search.php b/var/www/search.php index 963b35f..262bfe0 100644 --- a/var/www/search.php +++ b/var/www/search.php @@ -9,35 +9,6 @@ body {

Search by

- -
Username:

diff --git a/var/www/usernameSearch.php b/var/www/usernameSearch.php index 124f6a7..183ad88 100644 --- a/var/www/usernameSearch.php +++ b/var/www/usernameSearch.php @@ -1,7 +1,31 @@ + -Username is +connect_error) { + die("Connection failed: " . $conn->connect_error); +} +echo "Connected successfully"; + +$query = "Select * from contacts where username = " + $username; + +print $query; +?>