473,414 Members | 1,980 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

PHP Flash form help

Hey,
I am new to PHP, and i have been reading up on it a little, but I seem to be having some trouble. In a flash website im making i created a form from a template i found. The original template had E-mail, Name, Comment fields, and the PHP code is as follow,

Expand|Select|Wrap|Line Numbers
  1.  
  2. <?
  3.  
  4. $destination="mjweitz@gmail.com";
  5. $name=$_POST['name'];
  6. $email=$_POST['email'];
  7. $mes=$_POST['comments'];
  8. $subject="Message from $name" ;
  9. $mes="Name : $name\n
  10. Email: $email\n
  11. Comments: $mes\n";
  12. mail($destination,$subject,$mes); ?>
  13.  
  14.  

In the flash video, i added a few fields, Street Address, City, State, Zip, Favorite Designers, and i reformated the code to this, but now it doesnt work at all. If anyone can assist me in what i am doing wrong, i would be greatly happy.

Expand|Select|Wrap|Line Numbers
  1.  
  2. <?
  3.  
  4. $destination="mjweitz@gmail.com";
  5. $name=$_POST['name'];
  6. $email=$_POST['email'];
  7. $mes=$_POST['street'];
  8. $mes=$_POST['city'];
  9. $mes=$_POST['state'];
  10. $mes=$_POST['zip'];
  11. $mes=$_POST['designer'];
  12. $mes=$_POST['comments'];
  13. $subject="LINK WEBSITE Form, From $name" ;
  14. $mes="Name : $name\n
  15. Email: $email\n
  16. Street Address: $street\n";
  17. City/Town: $city\n";
  18. State: $state\n";
  19. Zip: $zip\n";
  20. Favorite Designers: $designer\n";
  21. Comments: $mes\n";
  22. mail($destination,$subject,$mes); ?>
  23.  
  24.  
Feb 28 '08 #1
3 1483
Markus
6,050 Expert 4TB
Hey,
I am new to PHP, and i have been reading up on it a little, but I seem to be having some trouble. In a flash website im making i created a form from a template i found. The original template had E-mail, Name, Comment fields, and the PHP code is as follow,

Expand|Select|Wrap|Line Numbers
  1.  
  2. <?
  3.  
  4. $destination="mjweitz@gmail.com";
  5. $name=$_POST['name'];
  6. $email=$_POST['email'];
  7. $mes=$_POST['comments'];
  8. $subject="Message from $name" ;
  9. $mes="Name : $name\n
  10. Email: $email\n
  11. Comments: $mes\n";
  12. mail($destination,$subject,$mes); ?>
  13.  
  14.  

In the flash video, i added a few fields, Street Address, City, State, Zip, Favorite Designers, and i reformated the code to this, but now it doesnt work at all. If anyone can assist me in what i am doing wrong, i would be greatly happy.

Expand|Select|Wrap|Line Numbers
  1.  
  2. <?
  3.  
  4. $destination="mjweitz@gmail.com";
  5. $name=$_POST['name'];
  6. $email=$_POST['email'];
  7. $mes=$_POST['street'];
  8. $mes=$_POST['city'];
  9. $mes=$_POST['state'];
  10. $mes=$_POST['zip'];
  11. $mes=$_POST['designer'];
  12. $mes=$_POST['comments'];
  13. $subject="LINK WEBSITE Form, From $name" ;
  14. $mes="Name : $name\n
  15. Email: $email\n
  16. Street Address: $street\n";
  17. City/Town: $city\n";
  18. State: $state\n";
  19. Zip: $zip\n";
  20. Favorite Designers: $designer\n";
  21. Comments: $mes\n";
  22. mail($destination,$subject,$mes); ?>
  23.  
  24.  
[php]
$destination="mjweitz@gmail.com";
$name=$_POST['name'];
$email=$_POST['email'];
$mes=$_POST['street'];
$mes=$_POST['city'];
$mes=$_POST['state'];
$mes=$_POST['zip'];
$mes=$_POST['designer'];
$mes=$_POST['comments'];
$subject="LINK WEBSITE Form, From $name" ;
$mes="Name : $name\n
Email: $email\n
Street Address: $street\n
City/Town: $city\n
State: $state\n
Zip: $zip\n
Favorite Designers: $designer\n
Comments: $mes\n";
mail($destination,$subject,$mes); ?>
[/php]

Notice the quotes and semicolons i took out.
They are used to end strings... you were ending strings that hadnt even started :P
Feb 28 '08 #2
TheServant
1,168 Expert 1GB
[php]
$destination="mjweitz@gmail.com";
$name=$_POST['name'];
$email=$_POST['email'];
$mes=$_POST['street'];
$mes=$_POST['city'];
$mes=$_POST['state'];
$mes=$_POST['zip'];
$mes=$_POST['designer'];
$mes=$_POST['comments'];
$subject="LINK WEBSITE Form, From $name" ;
$mes="Name : $name\n
Email: $email\n
Street Address: $street\n
City/Town: $city\n
State: $state\n
Zip: $zip\n
Favorite Designers: $designer\n
Comments: $mes\n";
mail($destination,$subject,$mes); ?>
[/php]

Notice the quotes and semicolons i took out.
They are used to end strings... you were ending strings that hadnt even started :P
I don't understand why you are changing the $mes variable? Shouldn't it be:
[php]
$destination="mjweitz@gmail.com";
$name=$_POST['name'];
$email=$_POST['email'];
$street=$_POST['street'];
$city=$_POST['city'];
$state=$_POST['state'];
$zip=$_POST['zip'];
$designer=$_POST['designer'];
$comments=$_POST['comments'];
$subject="LINK WEBSITE Form, From $name" ;
$mes="Name : $name\n
Email: $email\n
Street Address: $street\n
City/Town: $city\n
State: $state\n
Zip: $zip\n
Favorite Designers: $designer\n
Comments: $comments\n";
mail($destination,$subject,$mes); ?>
[/php]
Feb 28 '08 #3
Now that i see it, its so obvious. I guess looking at the same thign over and over, you tend to ove rlook the minor mistakes. Thank you guys very much for your help.
Back to the books!
Feb 29 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Frank M. | last post by:
Hello, I want to make a form with Macromedia Flash. I use php and mysql on my site. Is there any good tutorial on the net how to start developing a flash form? Most important is the data...
2
by: Mark | last post by:
Hi all, This is what I'm trying to do. I'm trying to load a flash movie transparently over my existing html page (not covering the full screen, but 75% of it), so it is kind of similar to a...
0
by: rbmako69 | last post by:
I have a large html table and form, for displaying data and for updating the record data. To make this form look really good, i'm deciding to convert the html form into flash. The page has one...
16
by: Head In A Pan | last post by:
OK... I am now heading into day 3 of attempting to populate a database through my flash form!! I figure I need some help before I crack! I just can't get it to work at all... I am able to get...
3
by: plongo01 | last post by:
Form some reason I cannot get the flash form to align in the center of the page. Here is my code: <cfform format="flash" skin="haloblue"> <cfformgroup type="vertical"...
1
by: Blackmore | last post by:
I'v got a flash form with two dates on it. I want the form to automatically display the difference between these two dates, when opened and if and when the dates are altered. Is it possible to do...
1
by: betaboy12 | last post by:
I'm in the process of creating a flash based widget that send over one field in a form to a PHP file. I need help determing which action scripting I should use for this. The user flow is: User...
3
by: mringuk | last post by:
I have included a feedback form within my Flash Site which contains two sets of Yes/No RadioButtons. The Form text fields are interfacing with the PHP correctly but the two questions with...
0
davide marchi
by: davide marchi | last post by:
Hi friends, I need to extract email addresses from a public site that publishes the names of companies in adobe flash format: http://www.vinitaly.com/catalogo I only use Linux, but do not yet...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.