![]() Topic awaiting preservation: Lame PHP Form Question (Page 1 of 1) |
|
---|---|
Paranoid (IV) Inmate From: Lost Angeles Kalifornia, via Hawaii.... |
![]() Ok so I have this PHP guru guy that's been helping me trudge through my PHP on my site and he's not available to help me with what I'm assuming is a simple task... |
Maniac (V) Mad Scientist with Finglongers From: Germany |
![]() all but the first = should be .=, since you're appending to the string. |
Paranoid (IV) Inmate From: London |
![]() |
Paranoid (IV) Inmate From: cell 3736 |
![]() this is a string specific thing |
Maniac (V) Mad Scientist From: Denver, CO, USA |
![]() yeah, string concatenation is done with a dot between strings. You may also want to through line breaks in after each of the fields "\n" (again, string concatenated) so it won't be one long string. code: $this_message = $_POST['senderName'] . "\n"; $this_message .= $_POST['senderEmail'] . "\n"; $this_message .= $_POST['senderAddy'] . "\n"; $this_message .= $_POST['senderCity'] . "\n"; $this_message .= $_POST['senderZip']; |
Paranoid (IV) Inmate From: Lost Angeles Kalifornia, via Hawaii.... |
![]() You guys are sick! I spent all night searching php blogs, php.net, etc. and could not for the life of me figure this out. |
Paranoid (IV) Inmate From: Lost Angeles Kalifornia, via Hawaii.... |
![]() Oh, one last thing... so how would I display the results in the email to look a little nicer? |
Maniac (V) Mad Scientist From: Denver, CO, USA |
![]() Anytime you want to glue together two strings, you need the dot. code: 1. $this_message = "Name: " . $_POST['senderName'] . "\n";
code: 2. $this_message = "Name: {$_POST['senderName']}\n";
code: 3. $this_message = "Name: $senderName\n";
|
Paranoid (IV) Inmate From: Lost Angeles Kalifornia, via Hawaii.... |
![]() You're Awesome... that does the trick. I just needed to know exactly what that was called to search for it. |
Paranoid (IV) Inmate From: cell 3736 |
![]() if this form is for regular users then please read about email injection or otherwise spammers will use your site to send e-mails to whoever they want... |