I very rarely do any php so i'm having this slight issue with some php script on my site. If anyone has any insite as to how I can fix it. It would be greatley appreciated.

<td colspan="2"><a href="screen_print.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('screen','','../images/index_r8_c2_roll.jpg',1)"><img src="../images/index_r8_c2.jpg" alt="Screen Printing" name="screen" width="166" height="47" border="0" id="screen" /></a></td>

I think the error is in this section somewhere

'screen','','../images/index_r8_c2_roll.jpg',1)"

Thanks in advance for any help.

    There is no PHP code in that code snippet. You should provide more context since the problem may be related to this part, but without the context it is hard to say what really is the problem, and thus what should be the appropriate solution.

      Ok here is the PHP copied from Dreamweaver. And the section where it is giving me the error.

      <?php
      if(!$email == "" && (!strstr($email,"@") || !strstr($email,"."))) 
      {
      echo "<h2>Use Back - Enter valid e-mail</h2>\n"; 
      $badinput = "<h2>Feedback was NOT submitted</h2>\n";
      echo $badinput;
      }
      
      $todayis = date("l, F j, Y, g:i a") ;
      
      $attn = $attn ; 
      //The subject of the email:
      $subject = 'Deadbolt Media Quote Requested';
      
      $comments = stripcslashes($comments); 
      
      $message = " Customer Information \n
      Name: $_POST[name]
      Company: $_POST[company]
      Phone: $_POST[phone]
      Email: $_POST[email] \n
      How would you like to recieve your quote?: $_POST[quote_receive] \n
      Garment Style: $_POST[garment_number]
      Garment Color: $_POST[garment_color] \n
      Quantity and Sizes \n
      Small: $_POST[quantity_small]
      Medium: $_POST[quantity_medium]
      Large: $_POST[quantity_large]
      X-Large: $_POST[quantity_xlarge]
      XX-Large: $_POST[quantity_xxlarge]
      XXX-Large: $_POST[quantity_xxxlarge]
      Other: $_POST[quantity_other] \n
      Colors and Locations \n
      Front: $_POST[design_front]
      Back: $_POST[design_back]
      Left Sleeve: $_POST[design_lsleeve]
      Rigth Sleeve: $_POST[design_rsleeve]
      Other Location: $_POST[design_other]
      How else can we assist you: $_POST[comments]
      ";
      
      $from = "From: $_POST[name]\n";
      
      
      mail("info@deadboltmedia.com", $subject, $message, $from);
      
      
      // Change the names below to the 3 required fields in your form. If these fields are not filled out, the script will not send an email and display an error message instead, asking the visitor to fill out the form again.
      $req1 ="$name";
      $req2 ="$email";
      $req3 ="$phone";
      
      //The below error message will be displayed if not all required fields are filled in. Feel free to use normal HTML in this.
      $error_required = '<table border="0" cellpadding="0" cellspacing="0" width="858" align="center" valign="top">
            <td colspan="2"><a href="screen_print.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('screen','','../images/index_r8_c2_roll.jpg',1)"><img src="../images/index_r8_c2.jpg" alt="Screen Printing" name="screen" width="166" height="47" border="0" id="screen" /></a></td>
         <td colspan="4"><a href="embroidery.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('embroidery','','../images/index_r8_c4_roll.jpg',1)"><img src="../images/index_r8_c4.jpg" alt="Embroidery" name="embroidery" width="168" height="47" border="0" id="embroidery" /></a></td>
         <td colspan="2"><a href="sign_making.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('sign','','../images/index_r8_c8_roll.jpg',1)"><img src="../images/index_r8_c8.jpg" alt="Sign Making" name="sign" width="167" height="47" border="0" id="sign" /></a></td>
         <td colspan="2"><a href="gallery.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('gallery','','../images/index_r8_c10_roll.jpg',1)"><img src="../images/index_r8_c10.jpg" alt="Gallery" name="gallery" width="167" height="47" border="0" id="gallery" /></a></td>
         <td colspan="7"><a href="testimonials.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('testimony','','../images/index_r8_c12_roll.jpg',1)"><img src="../images/index_r8_c12.jpg" alt="Customer Testimonials" name="testimony" width="170" height="47" border="0" id="testimony" /></a></td>
        </tr>
      </table>';
      
      ?>

      I may be doing this completely wrong. Any advice will be appreciated.

        Ah, now the problem becomes obvious. Notice the syntax highlighting:

        $error_required = '<table border="0" cellpadding="0" cellspacing="0" width="858" align="center" valign="top">
              <td colspan="2"><a href="screen_print.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('screen','','../images/index_r8_c2_roll.jpg',1)"><img src="../images/index_r8_c2.jpg" alt="Screen Printing" name="screen" width="166" height="47" border="0" id="screen" /></a></td>
           <td colspan="4"><a href="embroidery.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('embroidery','','../images/index_r8_c4_roll.jpg',1)"><img src="../images/index_r8_c4.jpg" alt="Embroidery" name="embroidery" width="168" height="47" border="0" id="embroidery" /></a></td>
           <td colspan="2"><a href="sign_making.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('sign','','../images/index_r8_c8_roll.jpg',1)"><img src="../images/index_r8_c8.jpg" alt="Sign Making" name="sign" width="167" height="47" border="0" id="sign" /></a></td>
           <td colspan="2"><a href="gallery.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('gallery','','../images/index_r8_c10_roll.jpg',1)"><img src="../images/index_r8_c10.jpg" alt="Gallery" name="gallery" width="167" height="47" border="0" id="gallery" /></a></td>
           <td colspan="7"><a href="testimonials.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('testimony','','../images/index_r8_c12_roll.jpg',1)"><img src="../images/index_r8_c12.jpg" alt="Customer Testimonials" name="testimony" width="170" height="47" border="0" id="testimony" /></a></td>
          </tr>
        </table>';

        The problem is that the string literal is single quoted, but you use single quotes within it without escaping them. As such, instead of:

        onmouseover="MM_swapImage('screen',

        you should write:

        onmouseover="MM_swapImage(\'screen\',

        as so on.

          No problem 🙂
          Remember to mark this thread as resolved using the thread tools.

            Write a Reply...