473,406 Members | 2,619 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,406 software developers and data experts.

Not sure how to fix this error?Line 11 is the $recipient =

2
------------mail.php
Expand|Select|Wrap|Line Numbers
  1. <?php
  2. $name = $_POST['name'];
  3. $email = $_POST['email'];
  4. $phone = $_POST['phone'];
  5. $call = $_POST['call'];
  6. $website = $_POST['website'];
  7. $priority = $_POST['priority'];
  8. $type = $_POST['type'];
  9. $message = $_POST['message'];
  10. $formcontent=" From: $name \n Phone: $phone \n Call Back: $call \n Website: $website \n Priority: $priority \n Type: $type \n Message: $message";
  11. $recipient = "hwy9drum@gmail.com";
  12.  
  13. $subject = "Contact Form";
  14. $mailheader = "From: $email \r\n";
  15. mail($recipient, $subject, $formcontent, $mailheader) or die("Error!");
  16. echo "Thank You!";
  17. ?>
  18. --------------html------------form.html
  19. <p>Name</p> <input type="text" name="name">
  20. <p>Email</p> <input type="text" name="email">
  21. <p>Phone</p> <input type="text" name="phone">
  22. <p>Request Phone Call:</p>
  23. Yes:<input type="checkbox" value="Yes" name="call"><br />
  24. No:<input type="checkbox" value="No" name="call"><br />
  25. <p>Website</p> <input type="text" name="website">
  26. <p>Priority</p>
  27. <select name="priority" size="1">
  28. <option value="Low">Low</option>
  29. <option value="Normal">Normal</option>
  30. <option value="High">High</option>
  31. <option value="Emergency">Emergency</option>
  32. </select>
  33. <br />
  34. <p>Type</p>
  35. <select name="type" size="1">
  36. <option value="update">Website Update</option>
  37. <option value="change">Information Change</option>
  38. <option value="addition">Information Addition</option>
  39. <option value="new">New Products</option>
  40. </select>
  41. <br />
  42. <p>Message</p><textarea name="message" rows="6" cols="25"></textarea><br />
  43. <input type="submit" value="Send"><input type="reset" value="Clear">
  44. </form>
Oct 30 '13 #1
2 1260
JakeMB
2
This is the error i get
Parse error: syntax error, unexpected T_STRING in D:\Hosting\1155\html\mail.php on line 11
Oct 30 '13 #2
Dormilich
8,658 Expert Mod 8TB
I would stab a guess at that there’s a " in one of the variables from line #10, which invalidates the string definition on line #11.
Oct 30 '13 #3

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

Similar topics

2
by: WindAndWaves | last post by:
Is it possible to find out at what line an error occurred for an error log??? --- Please immediately let us know (by phone or return email) if (a) this email contains a virus (b) you are...
1
by: Itzik | last post by:
Hi i have any error in my function can i get only error line Thanks
0
by: tascien | last post by:
How come, the stack trace does not show me the error line? when i run a release version of my asp.net web app? I get something like this: Error Message: Object reference not set to an instance...
2
by: Tony | last post by:
In visual studio 2005, while debugging a new web project in C#, the error line does not show up in the error dialog box. The actual error shows up correctly, but it does not tell me what line it...
1
by: rwelchman | last post by:
Hi, I have a problem with a submit form in that it does not submit(error message), I think because there is another form on the page whose action is to work out various inputted variables and give...
4
by: Ravi, Dallas, Texas | last post by:
http://www.netnewsgroups.net/group/microsoft.public.dotnet.framework.aspnet/topic22503.aspx shows ways to get errors in a server context. i am trying to find ways to trap the line number where...
0
by: rthimmana | last post by:
Hi We record the error line using the Err_Line() function within the catch block for our procedures. When we open the procedure and check the corresponding line number using a Management...
3
by: Ananthu | last post by:
Hi I have created one website named OTMS using ASP.NET in a File System Format.My project location is in F: drive(F:\Project\OTMS). I have installed IIS properly and the website runs properly in...
9
whatelyb
by: whatelyb | last post by:
I am having trouble related to the attached coding. I am trying to make the object "flight1pic" change depending on what is selected in the drop down menus "airline1" and "aircraft1". My...
4
by: Rylos007 | last post by:
Greetings, first post and in need of some code error help. I am ruff at html and .css skill wise. :) Home Page Good page w/ proper R-sidebar Evil page w/ improper R-sidebar. Error from WC3...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.