This is a discussion on "flash & php form help please" within the PHP Forum section. This forum, and the thread "flash & php form help please are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
flash & php form help please
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
flash & php form help please
Hi
So heres the story I have no knowledge of php what so ever but I have been using flash now for a little while (still going through training also training for the CIW qualifications) and I thought I was ready to create a flash form and edit the php script that i had a friend make me, it's a really simple script. Anyway I got the script to work with the starting 4 text boxes and a check box and i thought that I could simply copy the code and change the message a variables but i was obviously worng as it doesnt seem to work I always get the last 6 messages and nothing else. Can someone with php knowledge correct this simple script so I can process my form Kind regards Benjamin <?php $email_to = 'e-mail goes here'; $subject = 'subject goes here'; $result = array( 'did_mail_send' => 'yes', 'errormessage' => '' ); if ( !empty($_POST['email']) ) { $message = "First Name: " . $_POST['firstname']. "\n"; $message .= "Last Name: " . $_POST['lastname']. "\n"; $message = "Address: " . $_POST['address']. "\n"; $message .= "City/Town: " . $_POST['city'] . "\n"; $message = "County/state: " . $_POST['county'] . "\n"; $message .= "Post code: " . $_POST['post'] . "\n"; $message = "Phone: " . $_POST['phone'] . "\n"; $message .= "Extension: " . $_POST['extension'] . "\n"; $message .= "Email: " . $_POST['email'] . "\n\n"; $message .= "Special-requirements: \n\n" . $_POST['special'] . "\n\n"; $message .= "Urgent: \n\n" . $_POST['urgent']; $message .= "Phone reply: \n\n" . $_POST['reply']; $headers = "From: $from"; if ( !mail($email_to, $subject, $message, $headers) ) { $result[ 'did_mail_send' ] = 'no'; $result[ 'errormessage' ] = 'For some reason mail did not send'; } } echo 'did_mail_send=' . urlencode( $result['did_mail_send'] ) . '&errormessage=' . urlencode( $result[ 'errormessage' ] ); ?> |
|
|
|
|||
|
Re: flash & php form help please
you are missing .= on the address, county and phone in your message string. What that is doing is resetting the $message variable starting at the phone. Everything above it will be ignored.
to explain further, .= means to append to the current variable. Last edited by flann; Jun 25th, 2006 at 23:41. |
|
|||
|
Re: flash & php form help please
Thanks for your help I changed the script and all the messages are getting through so it's working fine , thanks again
Regards Benjamin |
![]() |
| Tags |
| flash, php, form, help |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| contact form using flash and php | ahwell | Flash & Multimedia Forum | 6 | Sep 17th, 2007 18:28 |
| Flash form does not appear in IE7!!! | article | Flash & Multimedia Forum | 6 | Aug 11th, 2007 12:47 |
| Can't seem to get this php/flash form to work. | Toby1979 | Flash & Multimedia Forum | 1 | Jun 30th, 2007 22:06 |
| Contact form in Flash 8 for CD-Rom? | Laakvand | Flash & Multimedia Forum | 2 | Jun 13th, 2007 15:37 |
| Flash login form? | bob_visualefx | Flash & Multimedia Forum | 7 | Nov 8th, 2006 03:33 |