Question: Server Side: Write the code of the server side shopping.php page such that. 1) The shopping.php checks using the regular expressions in PHP if the
Server Side:
Write the code of the server side shopping.php page such that.
1) The shopping.php checks using the regular expressions in PHP if the login is valid or not. A valid login must be exactly 5 characters and starts with a letter and followed by any one or more of the characters:_, $, 0-9, A-Z, a-z For instance, a12341, ab_$$1, and abc0Z_ are valid logins
while _a1, b9993333*, and c23_@2 are invalid logins. But, there are no restrictions on the
password; the user can use any character in the keyboard.
2) The shopping.php page reads the login and passwords from a database named "customers" to verify whether the customer is a valid user. The "customers" database contains two tables named "login_pssword" and shopping cart. The login_pssword table has three fields customer_Id,"login" and"password, "credit balance". "credit balance" contains the remaining balance in the credit card. Initially, the "credit balance" for every 1000 USD.
Check if the user name and passwords exist. If it exists print the message "Thank you for logging in" and show him/her the products to start choosing. If the password or login is not in the database, display the alert message "wrong password and/or login please try again" and do not show him/her the products. The shopping_cart table has 3 fields: product_Id, product_name, product_price,
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
