php - How can I append a string to the data from a form field -
i have form , need way of ensuring people particular email address can signup. example users allowed foo.com, every email address should myemail@foo.com. want user have enter email user name , after form submitted add @foo.com using php. how go implementing such feature , if there better way achieve desired result can find such information . thanks.
easy, name form field username example. name submit button submit example
then on form submit
if(isset($_post['submit'])){ $username = $_post['username']; $username .= "@foo.com" // jacksperro@foo.com // rest of code } on note, i'd put label after input box saying '@foo.com' let them know type username
Comments
Post a Comment