Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Jul 2007
    Posts
    100
    Thanks
    1
    Thanked 0 Times in 0 Posts

    correcting the syntax

    I need some help with small bit of code. I'm sure that the syntax of the code is incorrect, which is why I'm getting the error message. Could someone help me get the syntax correct?

    PHP Code:
      echo "<tr>
            <td align=\"center\"><b>Picslink:</b></td>
            <td align=\"center\"><input type=\"text\" name=\"picslink\" value=\"{$row['picslink']}\" />
            <a href=\"<?php echo $PHP_SELF?>?table=<?php echo $table?>&id=<?php echo $row['picslink']; ?>&mode=edit\" />Edit</a>
            </tr>";
    The part that's wrong is the '<a href= blah blah blah>' part. Here's the error message I get:

    Code:
    Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/user/public_html/dex/24r/php/insertinfo4.php on line 33
    Line 33 is the '<a href blah blah blah>' part

  • #2
    Super Moderator Inigoesdr's Avatar
    Join Date
    Mar 2007
    Location
    Florida, USA
    Posts
    3,647
    Thanks
    2
    Thanked 406 Times in 398 Posts
    PHP Code:
    echo "<tr>
            <td align=\"center\"><b>Picslink:</b></td>
            <td align=\"center\"><input type=\"text\" name=\"picslink\" value=\"{$row['picslink']}\" />
            <a href=\"{$_SERVER['PHP_SELF']}?table=$table&id={$row['picslink']}&mode=edit\" />Edit</a>
            </tr>"



  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •