Skip to content
Advertisement

Function not receiving correct inputs [closed]

JavaScript

I’m suspecting the beautify function is not working as expected. Because I’m not getting the echo statement if the emails don’t match. I’m expecting to get the echo statement if the emails don’t match. What is wrong with my code?

Advertisement

Answer

Change the function to only require the name of the form input field and have it return the “beautified” value to the caller.

JavaScript

Call it using $fname = beautify($_POST['reg_fname']); etc for each of your form input fields.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement