Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.