Question
7 19.8 Write a PHP script that tests whether an e-mail address is input correctly. Verify that the input begins with series of characters, followed
7 19.8 Write a PHP script that tests whether an e-mail address is input correctly. Verify that the input begins with series of characters, followed by the @ character, another series of characters, a period (.) and a final series of characters. Test your program, using both valid and invalid e-mail addresses.
- Create a php tag to write the php code.
- Use isset() method to activate the process when the form is submitted
- Use $_POST() method to retrieve the email value from the form.
- Retrieve the email value and assign the value in a variable named $email.
- Create a email regular expression and assigned it in a new variable name $emailPattern.
- Use pregame_match() function to check the email pattern is correct or wrong.
- Create an HTML tag.
- Create a form and assign action properly as email.
- Create a submit button.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started