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

Popular posts from this blog

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

javascript - Confirm a form & display message if form is valid with JQuery -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -