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 4 of 4

Thread: php parse error

  1. #1
    Regular Coder
    Join Date
    May 2008
    Posts
    446
    Thanks
    23
    Thanked 5 Times in 5 Posts

    php parse error

    This is the error I am getting:

    Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/surreal/public_html/index.php on line 51

    This is what line 51 contains:

    Code:
    <table border="1" width="100%" style="background-image: url('http://i95.photobucket.com/albums/l136/surreal5335/RE%20site/Fotolia_2695889_XS.jpg'); background-repeat: no-repeat; background-attachment: fixed; background-position: right bottom;">
    Here is the page of code that I am trying to get to work from start to finish:


    Code:
    <?php
    ini_set('display_errors','on');
    error_reporting(E_ALL);
    ?>
    <html>
    <head>
    
    <script language="javascript" type="text/javascript">
    
    
    function rollOn(obj){
    obj.src=obj.src.replace(/.png/,"blue.png");
    }
    function rollOff(obj){
    obj.src=obj.src.replace(/blue.png/,".png");
    }
    
    
    
    var currentSpan = 1;
    function showMe(n) {
    document.getElementById("ex_"+currentSpan).style.display = "none";
    document.getElementById("ex_"+n).style.display = "block";
    currentSpan = n;
    }
    
    var currentDiv = 1;
    
    function showcontent(n) {
    
    // Hide the current side content that is being shown
    document.getElementById("SC_"+currentDiv).style.display = "none";
    
    // Show the new side content
    document.getElementById("SC_"+n).style.display = "block";
    
    // Set the current open side content
    currentDiv = n;
    }
    /*this css code is to be entered into the first table tahref=" ">advertise</a>
    <a href=" ">support</a>
    <a href=" ">submit content</a>
    <a href=" "></a>
    <a href=" "></a>
    </td>
    </tr>
    </table>';
    ?>
    I took some html that has nothing to do with the problem to make it less cumbersome.

    Thanks a lot for the help

  • #2
    Senior Coder Len Whistler's Avatar
    Join Date
    Jul 2002
    Location
    Vancouver, BC Canada
    Posts
    1,323
    Thanks
    26
    Thanked 100 Times in 100 Posts
    EDIT: delete
    Last edited by Len Whistler; 07-22-2008 at 06:18 PM. Reason: wrong solution - got Javascript code mixed up with PHP code
    Leonard Whistler

  • #3
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    It seems like there is a lot more code. Please post the rest of your code.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #4
    Regular Coder
    Join Date
    May 2008
    Posts
    446
    Thanks
    23
    Thanked 5 Times in 5 Posts
    well if you want all the code here it is:

    Code:
    <html>
    <head>
    
    <script language="javascript" type="text/javascript">
    
    
    function rollOn(obj){
    obj.src=obj.src.replace(/.png/,'blue.png');
    }
    function rollOff(obj){
    obj.src=obj.src.replace(/blue.png/,'.png');
    }
    
    
    
    var currentSpan = 1;
    function showMe(n) {
    document.getElementById("ex_"+currentSpan).style.display = "none";
    document.getElementById("ex_"+n).style.display = "block";
    currentSpan = n;
    }
    
    var CurrentSideContent = "SC1";
    
    function ShowContent(Element) {
    
    // Hide the current side content that is being shown
    document.getElementById(CurrentSideContent).style.display = "none";
    
    // Show the new side content
    document.getElementById(Element).style.display = "block";
    
    // Set the current open side content
    CurrentSideContent = Element;
    }
    
    
    
    </script>
    
    
    
    
    </head>
    <?php
    echo'
    <body>
    <table width="100&#37;" border="1" style="background-image:url(\'http://i95.photobucket.com/albums/l136/surreal5335/Fotolia_2695889_XS.jpg'\); background-repeat:no-repeat; background-attachment:fixed; background-position:right bottom;" >
    <tr>
    <td>
    <table width="100%" border="1">
    <tr>
    <td>
    //header logo
    </td>
    <td>
    //horizontal ad banner
    </td>
    </tr>
    </table>';
    
    include_once "renavbar.php";
    
    
    echo'
    <table border="1">
    <tr>
    <td>
    <table border="1">
    <tr>
    <td halign="left" valign="top">
    <!--listings--!>
    <img src="http://i95.photobucket.com/albums/l136/surreal5335/RE%20site/listingslogo.png" alt="listings" name="listings" id="listings"></a><br>
    <a href="http://realtor.com" >Realtor.com</a><br>
    <a href="http://realestate.com" >Realestate.com</a><br>
    <a href="http://frontdoor.com" >Frontdoor.com</a><br>
    <a href="http://realestate.yahoo.com" >Yahoo.com</a><br>
    <a href="http://homes.com" >Homes.com</a><br>
    <a href=" " >Compare</a><br><br>
    </td>
    <td halign="left" valign="top">
    <!--education--!>
    <img src="http://i95.photobucket.com/albums/l136/surreal5335/RE%20site/educationlogo.png" alt="home" name="education" id="education"></a><br>
    <a href=" ">Allied Schools</a><br>
    <a href="http://www.foreclosureuniversity.com/">Foreclosure University</a><br>
    <a href=" ">DVDs</a><br>
    <a href=" ">Books</a><br><br>
    <br>
    </td>
    <td halign="left" valign="top">
    <!--products--!>
    <img src="http://i95.photobucket.com/albums/l136/surreal5335/RE%20site/productslogo.png" alt="home" name="products" id="products"></a><br>
    <a href=" ">Cashflow 101</a><br>
    <a href=" ">Real Estate Empire</a><br>
    <a href=" ">Real Estate Tycoon</a><br><br><br>
    </td>
    </tr>
    <tr>
    <td halign="left" valign="top">
    <!--calculators--!>
    <img src="http://i95.photobucket.com/albums/l136/surreal5335/RE%20site/calculatorlogo.png" alt="caluculators" name="caluculators" id="caluculators"></a><br>
    <a href="http://www.frontdoor.com/tools/calculators/return_on_investment.aspx" >Return on investment</a><br>
    <a href="http://finance.realtor.com/homefinance/calculators/mortgagepayment.asp?lnksrc=FINCALCINDMC001" >Mortgage payment</a><br>
    <a href="http://www.zillow.com/mortgage/calculator/Adjustable-rate-mortgage-calculator.htm" >Adjustable rate</a><br>
    <a href="http://finance.realtor.com/Homefinance/Calculators/Projection.asp?lnksrc=FINCALCINDPROJ001" >Home value projection</a><br>
    <a href="http://www.realtor.com/home-garden/home-improvement/tools/calculators/remodelcalc.aspx" >Remodel or move</a><br>
    <a href="calculators.html" >View all</a><br><br>
    
    </td>
    <td halign="left" valign="top">
    
    <!--videos--!>
    <img src="http://i95.photobucket.com/albums/l136/surreal5335/RE%20site/videologo.png" alt="videos" name="videos" id="videos"></a><br>
    <a href="http://www.youtube.com/v/x1iebg0QIhQ&hl=en" >Buying Foreclosures</a><br>
    <a href="http://www.youtube.com/v/SP4UyOQ-Op0&hl=en" >Tips For Flipping Houses</a><br>
    <a href="http://www.youtube.com/v/iLwjx5B9SSg&hl=en" >Real estate investing (Part 1)</a><br>
    <a href="http://www.youtube.com/v/SQQlxSHHl5I&hl=en" >Buy with no money down</a><br>
    <a href="http://www.youtube.com/v/zdZw57gBUqY&hl=en" >The Home Inspection Process</a><br>
    <a href="videos.html" >View all</a><br><br>
    </td>
    <td halign="left" valign="top">
    
    <!--charts--!>
    <img src="http://i95.photobucket.com/albums/l136/surreal5335/RE%20site/chartslogo.png" alt="charts" name="charts" id="charts"></a><br>
    <a href="http://i95.photobucket.com/albums/l136/surreal5335/RE%20site/mortgagerates.png" >Mortgage rates</a><br>
    <a href="http://i95.photobucket.com/albums/l136/surreal5335/RE%20site/monthlyfrcl.png" >Monthly foreclosures</a><br>
    <a href="http://i95.photobucket.com/albums/l136/surreal5335/RE%20site/housesstart.png" >Housing starts</a><br>
    <a href="http://i95.photobucket.com/albums/l136/surreal5335/RE%20site/housessold.png" >Housing sold</a><br>
    <a href="charts.html" >View all</a><br><br>
    
    </td>
    </tr>
    </table>
    
    </td>';
    
    
    
    
    
    include_once "rollcontent.php";
    
    
    
    
    echo'
    </td>
    <td>
    </td>
    //vertical banner ad
    </td>
    </tr>
    </table>
    <table>
    <tr>
    <td>
    //bottom navigation
    <a href=" ">advertise</a>
    <a href=" ">support</a>
    <a href=" ">submit content</a>
    <a href=" "></a>
    <a href=" "></a>';
    ?>
    Thanks a lot for the help
    Last edited by surreal5335; 07-22-2008 at 10:38 PM. Reason: [code tags mixed up


  •  

    Posting Permissions

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