Initial Output - 20241020 - 173041 - 0000
Initial Output - 20241020 - 173041 - 0000
Initial Output - 20241020 - 173041 - 0000
Initial Output
1. LOGIN
2. EXIT
If the user inputs 1 for login and enters the correct credentials (vasu as the username and vasu6072
as the password):
Connected
WELCOME TO HOSPITAL
7. Patient detail
8. Doctor detail
9. Worker detail
10. Exit
If the user chooses to register a patient (input 1), provides the required details, and everything is
successful:
Enter Age: 30
SUCCESSFULLY REGISTERED
If the user chooses to view total patient details (input 4), and there are patients in the database, the
output will look something like this:
If the user enters an invalid choice at any prompt, the script will respond with:
Error Handling
If there are issues with the database connection, such as wrong credentials for MySQL or if the
database does not exist, you might see an output like:
Connection failed.
Final Output
After the user has finished interacting with the application, the connection to the database will be
closed:
Summary
The actual output will depend on user inputs and the state of the database (like whether tables exist,
etc.).