- Php 1 Write Php Script To Update Values From The Database The Database Epoka Has A Table Named User With Two Fields E 1 (86.13 KiB) Viewed 55 times
PHP 1) Write PHP script to update values from the database. The database Epoka has a table named User with two fields: e
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
PHP 1) Write PHP script to update values from the database. The database Epoka has a table named User with two fields: e
PHP 1) Write PHP script to update values from the database. The database Epoka has a table named User with two fields: email and password. a) Create a form to update the current logged in user. The id of the current logged in user you can find it from $_SESSION['user_id']. When you first open the form, show the current email and password (do not leave the input fields empty). To connect to the database use credentials: Server: 127.0.0.1, database: Epoka, Username: root, Password: ". b) When submitting the data, validate the email with gular expression. Email format should be first letter of the first name followed by last name followed by 2 numbers followed by "@epoka.edu.al" or "@epoka.al" or "@cen.epoka.edu.al”. Password should be at least 6 characters long and contain a special character. c) In a validation.txt file, write the user_id of any unsuccessful attempt to update, separated by commas. For example: If I try to update my email wrongly, write in the validation.txt file my user id (get it from Session).