I am having trouble with part 4 with the access and showing the ip address as we
ID: 3845114 • Letter: I
Question
I am having trouble with part 4 with the access and showing the ip address as well the customers. this is a php program.
C Am Having Trouble With P x 2017s CPS3740 Google D X €- C Secure https:/ drive.google.com For 2017s.cPs3740 project1.pdf Open with Lumin PDF CPS 3740/Spring 2017 Database Management Systems Project Phasell1 Dr. Huang page 1/2 Presentation date: Score Name Project description: This is an individual project with 4 phases, and this is the first phase You have to finish phase #1 in order to work on phase #2. You will design and implement an online Information system using MySQL HTML and (PHP or JAVA). You can refer to demo ht mc.kean.edu/CPS3740 Platform requirement: 1. You have to implement the projects on eve.kean.edu 2. You have to use MySQL to implement the database functions and store tables/data at imc.kean.edu. Your project CAN NOT be based the personal database running on your laptop or PC at home. Phase #1 will require you to develop the following functions (total 100 points 1. (10 pts) Create a CPS3740 project website on eve.kean.edu as shown in Figure 1 (4 pts) Permission mode 705 for your project folder and all PHP/HTML files 1.1 1.2 4 pts) Your project URL should be htt eve.kean.edu/NXXXXX/CPS3740/index.htm (2 pts) The main page should show your name and two links to project 1 and project 2. 1.3 2. (10 pts) When users click on Project 1 link, you should show the following features as shown in Figure 2 (2 pts) Display welcome message with your name and Project 1. 2.1 (2 pts) A link to list all users in the store 2.2 (4 pts) Two textboxes for user to enter login ID and password, and a submit button. 2.3 2.4 (2 pts) You have to use POST method to implement the HTML FORM. Welcome to Austin Huang's CPS3740 project l imec.kean.edu/ CPS3740 index php list all users Welcome to Austin CPS3740 Project Login ID: panda Project Password: Submit 2. Project 2 gure 2. project 1 page Figure 1 Page 3. 10 pts) When users click on th ink "listall users" a program should be called to list a users at ecuarcoExplanation / Answer
Proper schema of tables is not given here but code is mentioned below to get Ip addrees and displa the users from DB:
<?php
$servername = "localhost";
$username = "username";
$password = "password";
$dbname = "myDB";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql = "SELECT id, name, balance, zipcode FROM Users";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {
echo "id: " . $row["id"]. " - Name: " . $row["Name"]. " " . $row["Balance"]." " . $row["ZipCode"]. "<br>";
}
} else {
echo "0 results";
}
$conn->close();
?>
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.