Question: Please help IN PHP and explain the process. Create a form that asks the user for a string input using the GET method. The form
Please help IN PHP and explain the process.
Create a form that asks the user for a string input using the GET method. The form should have a text input field and a submit button.
Using the $_GET superglobal variable, retrieve the user input from the form.
Use the strlen() function to count the number of characters in the user input.
Use the strtoupper() function to convert the user input to all uppercase letters.
Use the strtolower() function to convert the user input to all lowercase letters.
Use the strrev() function to reverse the user input.
Print out the original user input, the number of characters in the input, the uppercase version of the input, the lowercase version of the input, and the reversed version of the input in separate paragraph tags.
Create a new form that asks the user for two string inputs using the POST method. The form should have two text input fields and a submit button.
Using the $_POST superglobal variable, retrieve the two user inputs from the form.
Use the strstr() function to find the first occurrence of the second user input in the first user input.
Use the str_replace() function to replace all occurrences of the second user input in the first user input with "REDACTED".
Print out the original first user input, the second user input, and the modified first user input with the redacted word in separate paragraph tags.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
