squaringkarma Posted February 12, 2009 Share Posted February 12, 2009 Hi again. What's a common way of verifying someone has entered their initials? My thought process was this: Person enters their name in three separate fields on a form: First Name, Middle Initial, and Last Name. [other fields not relating to this question.] Person enters their initials in a field called Initials. If they didn't enter a Middle Initial, I ask them to enter in an * where it would be. I would then take a substring of the First Name, Middle Initial, and Last Name fields and put them into an array. If they didn't enter a Middle Initial, I would somehow put the default value of that substring as an *. I would then use implode to convert the array to a string. Then I would compare the new string to the value of the field Initials. ...But I was wondering if there was a simpler/more intuitive way of doing the task. Hopefully my way made sense? Link to comment https://forums.phpfreaks.com/topic/144979-verifying-initials/ Share on other sites More sharing options...
MatthewJ Posted February 12, 2009 Share Posted February 12, 2009 Sounds fine, but I think you can probably skip the array step Link to comment https://forums.phpfreaks.com/topic/144979-verifying-initials/#findComment-760763 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.