matt121400 Posted September 24, 2008 Share Posted September 24, 2008 ok so i understand submitting forms and got that all fine and dandy but i have one problem which i couldn't find the answer too on the internet. for one submission to mysql id like it to be the input they had for username then automaticly @google.com at the endfor example. so i have $emailapp = $_POST['username'];(what do i put here to get the @google.com added on?????????) mysql_query("INSERT INTO tablename(emailapp) VALUES('$emailapp' )") but i need to know how to tack pon the @google.com to the end of the username how do i do that? Link to comment https://forums.phpfreaks.com/topic/125646-php-mysql-form-insertion-problem/ Share on other sites More sharing options...
.josh Posted September 24, 2008 Share Posted September 24, 2008 $emailapp = $_POST['username'] . "@google.com"; p.s.- It's officially called string concatenation, though I would be interested in knowing what search terms you were using, seeing as how searching anything from "putting two strings/vars together" to virtually any basic tut out there would show this... Link to comment https://forums.phpfreaks.com/topic/125646-php-mysql-form-insertion-problem/#findComment-649647 Share on other sites More sharing options...
phoenixx Posted September 24, 2008 Share Posted September 24, 2008 $emailapp = ($_post['username'] . "@google.com"); try the parenthesis if you are using older version of php Link to comment https://forums.phpfreaks.com/topic/125646-php-mysql-form-insertion-problem/#findComment-649664 Share on other sites More sharing options...
.josh Posted September 24, 2008 Share Posted September 24, 2008 like what...php2? Come on now... Link to comment https://forums.phpfreaks.com/topic/125646-php-mysql-form-insertion-problem/#findComment-649668 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.