There is a syntax error on line 25. Code hinting may not work until you fix this error.

Hello everyone. New to the forums and been enjoying Dreamweaver CS5's powerful capabilities up until this point. I'm a little new to PHP, and having a little trouble. I will link the PHP syntax for you guys to take a look at. What I'm trying to make is a PHP file that sends an email for a refer a friend type form. This is line 16-34. Lines 25 and 29 are highlighted red. I'm a bit confused as to the errors given here, so any help would be greatly appreciated. I understand there's no email address in the $to string, I took it out for privacy's sake. Thanks in advance!
<?php
    $yourname = $_POST('yourname');
    $youremail = $_POST('youremail');
    $friendsname = $_POST('friendsname');
    $friendsemail = $_POST('friendsemail');
    $other = $_POST('other');
    $to = '';
    $subject = 'Refer a Friend from Whimsical Practicality'
    $msg = "$yourname recommended Whimsical Practicality to $friendsname.\n" .
           "Customer's email address: $youremail\n" .
           "Friend's email address:      $friendsemail\n" .
           "Customer used this description: $other"
    mail($to, $subject, $msg, 'From:' . $yourname);
    echo 'Thanks for recommending us!<br />';
    echo 'Your recommendation has been sent.<br />';
    echo 'Please use the Back button to return to the previous page.<br />';      
?>      

Try PHP Code Checker.
http://phpcodechecker.com/
Nancy O.

Similar Messages

  • "There is a syntax error on line .. Code hinting may not work untill you fix this error"

    Hi guys, i hope your are all well and happy.
    i have syntax error on new pages created from template  (no errors in template) I use Dreamweave CS5
    Thiis is part of my code:
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <!-- InstanceBeginEditable name="doctitle" -->
    <title>| Building and Construction services | Maintenance services | Cleaning services | Buildant Ltd |</title>
    <!-- InstanceEndEditable -->
    <!-- InstanceBeginEditable name="head" -->
    <!-- InstanceEndEditable -->
    <link href="file:///D|/Local Sites/Buildant/CSS/buildant.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
    function MM_swapImgRestore() { //v3.0
      var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
    function MM_preloadImages() { //v3.0
      var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
        var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
        if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
    function MM_findObj(n, d) { //v4.01
      var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
        d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
      if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
      for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
      if(!x && d.getElementById) x=d.getElementById(n); return x;
    function MM_swapImage() { //v3.0
      var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
       if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
    </script>
    </head>
    I have highlited line with red (the dreamweaver telling me that syntax error is on this line)
    Could anybody please help mw with this one
    Thank you

    I copy and pasted your code and got the error. I rewrote the code and it went away. I have had problems in DW with templates that gave me errors when everything was good but the only way to fix it was to redo the template from scratch. Sounds stange, but true. The only other thing, and the experts here might chime in is to put the scripts in comment tags like below.
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <!-- TemplateBeginEditable name="doctitle" -->
    <title>| Building and Construction services | Maintenance services | Cleaning services | Buildant Ltd |</title>
    <!-- TemplateEndEditable -->
    <!-- TemplateBeginEditable name="head" -->
    <!-- TemplateEndEditable -->
    <link href="file:///D|/Local Sites/Buildant/CSS/buildant.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
    <!--
    function MM_swapImgRestore() { //v3.0
      var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
    function MM_preloadImages() { //v3.0
      var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
        var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
        if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
    function MM_findObj(n, d) { //v4.01
      var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
        d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
      if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
      for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
      if(!x && d.getElementById) x=d.getElementById(n); return x;
    function MM_swapImage() { //v3.0
      var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
       if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
    //-->
    </script>
    I don't get the error now, so I am unsure what to do.
    Jim

  • Why all of a sudden am I having difficulty sending Gmail emails? I get a send error. When I run diagnostics there is a SMTP and IMAP account for Gmail and I am not sure how to fix this.

    Why all of a sudden am I having difficulty sending Gmail emails? I get a send error. When I run diagnostics there is a SMTP and IMAP account for Gmail and I am not sure how to fix this.

    Hi jodilynnf,
    When using Connection Doctor to see what is could be causing the issue, look for the red dots to let you know what is wrong. Then all you have to do is correct that information. You can double click on the section that is giving you issue and it will take you there. Most issues could be just password being entered incorrectly. Take a look at the article below to walk you through troubleshooting issues with Mail.
    OS X Mail: Troubleshooting sending and receiving email messages
    http://support.apple.com/en-us/TS3276
     Take it easy,
    -Norm G.

  • Why does my phone keep popping up messages "This cable or accessory is not certified and may not work reliably with this iphone" when there is no cable connected?

    Why does my phone keep popping up messages "This cable or accessory is not certified and may not work reliably with this iphone" when there is no cable connected? This has been happening since IOS7 was installed and has become worse with 7.1. I have reset the phone several times with no change.The phone charges properly & I have never used anything but an Apple Lightning cable.

    I already cleaned the port with compressed air before submitting the problem. I since cleaned it with a toothpick and dug out some more lint. this seems to have just about fixed the problem since I have only had the error pop up 3 times since then and i was getting the error constantly before.

  • HT204053 there is a new email on my phone apple id when I try to make an app purchase my own apple id does not work. How does this happen and how can I change it back?

    There is a new email address on my phone in the apple id password box.  My password will not work.  How did this happen and how can I change it back?

    Of course your password shouldn't work on a different Apple ID. This can happen for many reasons, no worries, just sign out back back in using your own ID.
    iOS: Changing the signed-in iTunes Store account
              http://support.apple.com/kb/HT1311

  • Error message after upgrade to iTunes 11: "iTunes has detected a problem with your audio configuration. Audio/Video playback may not operate properly."  At this point my PC running XP loses all audio.

    Several attempts to upgrade to iTunes 11 have failed.  After an upgrade to 11 the error message reads: "iTunes has detected a problem with your audio configuration. Audio/Video playback may not operate properly."  At this point--after the upgrade to iTunes 11--my PC running Windows XP loses audio playback for all functions--in iTunes, in the browser and the volume icon disappears from the System Tray.  Only by removing iTunes 11, and then using System Restore to turn back the OS settings can I return the PC to normal functioning.
    I did that.  I reinstalled iTunes 10.5.  Everything seemed fine, but when I try to plug in and copy a CD to my iPhone 4S an error message reads roughly: 'iPhone 4S requires iTunes 10.5 or higher to work.'
    What might be the problem with my audio configuration?
    Why doesn't my iPhone 4S work with iTunes 10.5?  It used to work with iTunes 10.5.
    Please advise.
    ep

    This forum is for questions about iTunes U, Apple's service for colleges and universities to post educational material in the iTunes Store. You'll be most likely to get help with this issue if you ask in the general iTunes for Windows forums.
    Regards.

  • When I connect my I pod shuffle to USB it shows an error message - " I Tunes has deducted a problem with your audio configuration. Audio/Video playback may not operate properly" due to this problem each and every earphone am inserting goes unusable

    When I connect my I pod shuffle to USB it shows an error message - " I Tunes has deducted a problem with your audio configuration. Audio/Video playback may not operate properly" due to this problem whenever i connect  earphone each and every earphone gets un usable. Already made a factory reset. please arrange for a rectification.. :'(

    Hi Ganeshpandianm,
    Welcome to the Support Communities!
    The article below may be able to help you with this issue.
    Click on the link to see more details and screenshots. 
    iTunes for Windows: iTunes cannot run because it detects an issue with QuickTime
    http://support.apple.com/kb/TS1371?viewlocale=en_US
    "iTunes cannot run because it has detected a problem with your audio configuration"
    Cheers,
    - Judy

  • New computer win 8.1 pro, installed my creative Suite 4 Design premium but it shuts down when I try to use any of the programs and gives me an error code 147:20. How can I fix this?

    New computer win 8.1 pro, installed my creative Suite 4 Design premium but it shuts down when I try to use any of the programs and gives me an error code 147:20. How can I fix this? Is this a conflict with win 8.1 pro?

    You need to adjust your security stuff/ permissions and possibly use compatibility modes. It means that your licensing service is being blocked/ shut down.
    Mylenium

  • My IMessage has stopped working as every time I try to sign in it says 'An error occurred during activation'. How do you fix this?

    My IMessage has stopped working as every time I try to sign in it says 'An error occurred during activation'. How do you fix this?

    Hi,
    Have you activated messages on your settings page?
    HW

  • My macair won't turn on. when I try to turn it on, the white screen appears. But instead of the apple logo, there is a flashing folder that has a question mark on it. how do i fix this?

    my macair won't turn on. when I try to turn it on, the white screen appears. But instead of the apple logo, there is a flashing folder that has a question mark on it. how do i fix this?

    Try this.
    Erase and Reinstall OS X
    Note: This will delete all data on the disk. Back up important files before continuing.
    Erasing and then reinstalling OS X can give you a fresh start, making your computer exactly as it was whenever you received it from Apple. This can solve various problems such as corrupt system files.
    Shut down the computer by going to Apple () > Shut Down…
    Select Shut Down or allow the computer to shut down automatically.
    Plug in the MagSafe power adapter into a power source and then connect it to your Mac if you have not already done so.
    Press the Power Button to turn on the computer.
    Press and hold both the R and Command (⌘) keys on the keyboard until the Recovery partition loads.
    Select Disk Utility and then choose Continue.
    Select your startup disk (Macintosh HD by default) from the left.
    Select the Erase tab.
    Choose the Format pop-up menu and choose Mac OS Extended (Journaled), enter a name for your disk, and then click Erase.
    After the disk is erased, choose Disk Utility > Quit Disk Utility.
    Select Reinstall OS X and then choose Continue.
    Follow the instructions.
    I hope I solved your question.
    Austin

  • Is there an outage in the Hamlin, Tx area(79520) phones have not worked for 2 days?

    Is there and outage in the Hamlin, Tx area(79520) phons have not worked for 2 days?

    This is a peer-to-peer forum; if you have access to a landline, you may want to call Customer Service (800-922-0204) and ask.  You also could try contacting Customer Service via chat:
    Contact Us | Verizon Wireless

  • How do you fix this error?  Can't access photos Your photo library is either in use by another application or has become unreadable

    How do you fix this error?  Can't access photos----" Your photo library is either in use by another application or has become unreadable"

    Try this:  launch iPhoto with the Option key held down and create a new, test library.  Import some photos and check to see if the same problem persists. If you can create and use a new library then your current library is damaged.
    If that's the case make a temporary, backup copy (if you don't already have a backup copy) of the library and apply the two fixes below in order as needed:
    Fix #1
    Launch iPhoto with the Command+Option keys held down and rebuild the library.
    Select the options identified in the screenshot. 
    Fix #2
    Using iPhoto Library Manager  to Rebuild Your iPhoto Library
    Download iPhoto Library Manager and launch.
    Click on the Add Library button, navigate to your Home/Pictures folder and select your iPhoto Library folder.
    Now that the library is listed in the left hand pane of iPLM, click on your library and go to the File ➙ Rebuild Library menu option
    In the next  window name the new library and select the location you want it to be placed.
    Click on the Create button.
    Note: This creates a new library based on the LIbraryData.xml file in the library and will recover Events, Albums, keywords, titles and comments but not books, calendars or slideshows. The original library will be left untouched for further attempts at fixing the problem or in case the rebuilt library is not satisfactory.
    OT

  • With the iphone 4s sometimes the spotlight search does not work and you must restart the device. There will be an update that will fix the problem?

    with the iphone 4s sometimes the spotlight search does not work and you mustrestart the device. There will be an update that will fix the problem?

    Hi. I have 3 different casemate hard cases and i have been experiencing same problem.

  • U44M1P7 ERROR. UPDATES IMPOSSIBLE. WHEN WILL YOU FIX THIS????????

    WHEN WILL YOU FIX THIS? YOUR INDIFFERENCE IS SPECTACULAR!

    Hi,
    Please try the steps mentioned in the link below
    http://helpx.adobe.com/creative-suite/kb/error-u44m1p7-installing-updates-ccm.html
    and
    http://helpx.adobe.com/photoshop/kb/photoshop-cs6-updates-dont-install.html
    Thanks
    Kapil

  • My PC recodnises my headphones pluged in to the pc but there not how do i fix this?

    My PC recodnises my headphones pluged in to the pc but there not how do i fix this? Cant put headphones it it feels loose

    Close your iTunes,
    Go to command Prompt -
    (Win 7/Vista) - START/ALL PROGRAMS/ACCESSORIES, right mouse click "Command Prompt", choose "Run as Administrator".
    (Win XP SP2 &amp; above) - START/ALL PROGRAMS/ACCESSORIES/Command Prompt
    In the "Command Prompt" screen, type in
    netsh winsock reset
    Hit "ENTER" key
    Restart your computer.
    If you do get a prompt after restart windows to remap LSP, just click NO.
    Now launch your iTunes and see if it is working now.
    If you are still having these type of problems after trying the winsock reset, refer to this article to identify which software in your system is inserting LSP:
    iTunes 10.5 for Windows: May see performance issues and blank iTunes Store
    http://support.apple.com/kb/TS4123?viewlocale=en_US

Maybe you are looking for