Jump to content

php mysql form insertion problem


matt121400

Recommended Posts

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

$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...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.