Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

i need help with this in html and php. This assignment will build upon Assignment Two and Three. You will no longer use an array

i need help with this in html and php. This assignment will build upon Assignment Two and Three. You will no longer use an array to verify data from the form you created in Assignment 2 rather you will use the database your created in Assignment 3.

In this assignment you are to create a GUI that allows a user to login to the PPP. The GUI will ask for a username and password. This information will be verified against a database you will create that contains two fields username and password. You will have 30 entries one for each patient you created in Assignment 3. Once the username and password are validated the user should be directed to the GUI you created in Assignment 2. The user will then enter the required information along with the choice of viewing the given patients medical records or scheduling an appointment (validation and verification will take place since you have already created this code in Assignment 2 you will now just need to check against the DB table you created in Assignment 3 instead of the array you used). Based upon the option chosen one of the following actions occurs. If the user chooses the Medical Records option you will display a table showing the individuals medical records and the doctor they are associated with (you will just need to tweak your code from Assignment 3). If they patient choses the Schedule an Appointment option they should be allowed to view their current list of doctors based upon the data you will retrieve from the database table you created in Assignment 3 and then view their current appointment dates. The user then should be given the option to reschedule their appointment if necessary. Your database table should be updated accordingly based upon the option chosen. Once updated the system should display the Patients account before the change was made and after thus allowing the user to see what changes were made.

this was my code for assignment 2

Login

Physician/ Patient Portal

Patient Name: Required Field
Patient ID: Required Field
Patient Email:
Email me a transaction confirmation

this was my validate file for assignment 2

function Validate() {

var id = document.getElementById("PatientID");

var name = document.getElementById("PatientName");

var email = document.getElementById("Email");

var checkbox = document.getElementById('mail');

var pattern = new RegExp("^(?=(.*[0-9]){8}).{8}$");

if (name.value == "") {

alert("Please enter your name");

return false;

}

if ( !pattern.test(id.value) )

{

alert("Your ID must be 8 digits long");

return false;

}

if (checkbox.checked && email.value == ""){

alert("Please enter your Email" );

return false;

} else if (email.value.search(/[@]/) == -1 && email.value != "") {

alert("This is not a valid Email(it's missing \"@\")") ;

return false;

} else if (email.value.search(/[.]/) == -1 && email.value != ""){

alert("This is not a valid Email(it's missing \".\")") ;

return false;

}

if(Verify()){

alert("Welcome Patient" + " " +name.value);

return true;

} else{

alert ("The information given was not found in our systems");

return false;

}

}

function Verify() {

var id = document.getElementById("PatientID");

var name = document.getElementById("PatientName");

var valid = false;

var students = [

['David', '12319173'],

['Samuel', '19171316'],

['Nick', '53157964'],

['Marco', '78945612'],

['Jose', '12345678']

and this is my code for assignment 3

$result = mysqli_query($con,"SELECT * FROM PatientInformation");

echo "

";

while($row = mysqli_fetch_array($result)) { echo "

"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; } echo "
id PatientName Email PatientDoctor AppointmentDate MedicalRecord
" . $row['id'] . "" . $row['PatientName'] . "" . $row['Email'] . "" . $row['PatientDoctor'] . "" . $row['AppointmentDate'] . "" . $row['MedicalRecord'] . "
";

mysqli_close($con); ?>

i know it's alot but i really need help with this.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Spatial Database Systems Design Implementation And Project Management

Authors: Albert K.W. Yeung, G. Brent Hall

1st Edition

1402053932, 978-1402053931

More Books

Students also viewed these Databases questions

Question

What is digital literacy? Why is it necessary?

Answered: 1 week ago