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

How to understand 2 main() functions after using uftrace to profile the C++ program? -

c# - Update a combobox from a presenter (MVP) -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -