Webforumz's RSS FeedRSS Webforumz RegistrationRegister Contact Webforumz StaffContact

flash & php form help please

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.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > PHP Forum

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Jun 24th, 2006, 22:44
New Member
Join Date: Jun 2006
Location: united kingdom
Age: 22
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
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' ] );
?>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2  
Old Jun 26th, 2006, 00:34
Junior Member
Join Date: Jun 2006
Location: Wisconsin
Age: 30
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
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 26th, 2006 at 00:41.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Jun 26th, 2006, 11:07
New Member
Join Date: Jun 2006
Location: united kingdom
Age: 22
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
flash, php, form, help

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
contact form using flash and php ahwell Flash & Multimedia Forum 6 Sep 17th, 2007 19:28
Flash form does not appear in IE7!!! article Flash & Multimedia Forum 6 Aug 11th, 2007 13:47
Can't seem to get this php/flash form to work. Toby1979 Flash & Multimedia Forum 1 Jun 30th, 2007 23:06
Contact form in Flash 8 for CD-Rom? Laakvand Flash & Multimedia Forum 2 Jun 13th, 2007 16:37
Flash login form? bob_visualefx Flash & Multimedia Forum 7 Nov 8th, 2006 04:33


All times are GMT. The time now is 16:11.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8