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
    New to the CF scene
    Join Date
    Jul 2007
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Help with coding this into php code.

    I got the code listed below from javascriptkit.com and trying to download to my website as a php file using php designer 2007, but I keep getting the following error message. I don't know anything about php and very little about html. Can someone help me with the code to setup for php file so I can get this added to my website.


    Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/pillows4/public_html/includes/languages/english/gifts.php on line 76
    from this location



    http://javascriptkit.com/script/script2/pslide.shtml

    <table border="0" cellpadding="0">
    <caption><strong>Air Show Photos</strong></caption>
    <tr>
    <td width="100%"><img src="plane1.gif" width="300" height="240" name="photoslider"></td>
    </tr>
    <tr>
    <td width="100%"><form method="POST" name="rotater">
    <div align="center"><center><p><script language="JavaScript1.1">
    var photos=new Array()
    var which=0

    /*Change the below variables to reference your own images. You may have as many images in the slider as you wish*/
    photos[0]="plane1.gif"
    photos[1]="plane2.gif"
    photos[2]="plane3.gif"
    photos[3]="plane4.gif"
    photos[4]="plane5.gif"


    function backward(){
    if (which>0){
    window.status=''
    which--
    document.images.photoslider.src=photos[which]
    }
    }

    function forward(){
    if (which<photos.length-1){
    which++
    document.images.photoslider.src=photos[which]
    }
    else window.status='End of gallery'
    }
    </script><input type="button" value="&lt;&lt;Back" name="B2"
    onClick="backward()"> <input type="button" value="Next&gt;&gt;" name="B1"
    onClick="forward()"><br>
    <a href="#" onClick="which=1;backward();return false"><small>Start Over</small></a></p>
    </center></div>
    </form>
    </td>
    </tr>
    </table>

    <p align="center"><font face="arial" size="-2">This free script provided by</font><br>
    <font face="arial, helvetica" size="-2"><a href="http://javascriptkit.com">JavaScript
    Kit</a></font></p>

  • #2
    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
    Don't put that code directly in between <?php ?> tags. Thats likely the problem you are having. Just because a page has a .php extension, it doesn't mean that EVERYTHING should be in between <?php and ?>. After all php is just html once it gets to the client.
    ||||If you are getting paid to do a job, don't ask for help on it!||||


  •  

    Posting Permissions

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