+ Reply to Thread
Results 1 to 3 of 3

Thread: syntax error

  1. #1
    driveflexfuel is offline x10 Sophmore driveflexfuel is an unknown quantity at this point
    Join Date
    Jul 2008
    Posts
    159

    syntax error

    i am receiving a syntax error in this chunk of coding and for some reason I can not find it. I am hoping a second set of eyes or someone a little better at php could help me. If there is an easier way or better way of doing this please let me know.

    Code:
     
    <?php 
        include('cart_form.php');
        include('details/item_details.php');
        $page_id = "2VAB_EV1"; 
        include('comments/comments/comments_show.php');
        ?>
    
        <form method="POST" name="sample" action="leave_comment.php" onsubmit="return createTarget(this.target)" target="formtarget">
        <?php 
        echo "<input type='hidden' name='product_id' value='" . $page_id . "' />";
        ?>
        <input type='image' name='submit' src='../images/comment.jpg' onmouseover='this.src='../images/comment1.jpg';' onmouseout='this.src='../images/comment.jpg';' border='0' name='submit' alt='Leave a comment' />
        </form>

  2. #2
    mephis's Avatar
    mephis is offline x10Hosting Member mephis is an unknown quantity at this point
    Join Date
    Aug 2008
    Location
    London, UK
    Posts
    39

    Re: syntax error

    Quote Originally Posted by driveflexfuel View Post
    Code:
    (...)
    onmouseover='this.src='../images/comment1.jpg';'
    onmouseout='this.src='../images/comment.jpg';'
    (...)
    try this:
    Code:
     
    (...)
    onmouseover='this.src="../images/comment1.jpg";'
    onmouseout='this.src="../images/comment.jpg";'
    (...)
    using single quotes both in the html and the javascript is giving you the error, just use single quotes for one thing and double quotes for the other
    Last edited by mephis; 11-01-2008 at 06:01 PM.

  3. #3
    driveflexfuel is offline x10 Sophmore driveflexfuel is an unknown quantity at this point
    Join Date
    Jul 2008
    Posts
    159

    Re: syntax error

    It is always the smallest things that drive me nuts.

    Thanks the code is working without error.

    You may close this thread

+ Reply to Thread

Similar Threads

  1. 500 Internal Server Error
    By halo elite in forum Free Hosting
    Replies: 4
    Last Post: 10-26-2008, 03:07 PM
  2. 500 Internal Server Error (PHP Error?)
    By aniklaus in forum Free Hosting
    Replies: 3
    Last Post: 11-12-2007, 11:47 AM
  3. [Apache] Syntax error in httpd.conf
    By flapietoetoe in forum Scripts & 3rd Party Apps
    Replies: 7
    Last Post: 06-04-2006, 04:29 AM
  4. {req} Banners
    By SEŅOR in forum The Marketplace
    Replies: 23
    Last Post: 01-05-2006, 03:15 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers