SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Addict
    Join Date
    Jun 2007
    Location
    Plymouth uk
    Posts
    313
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    this page works in opera but not iexplorer

    as i said this works ok in opera but get errors on page if run in explorer when you press either button
    any ideas
    cheers
    Doug

    PHP Code:
    //Retrieves data from MySQL

     
    $data mysql_query("SELECT * FROM register where name='$myname'") or die(mysql_error());
     
    $count mysql_num_rows($data);
     if (
    $count==0) { 
    header ("Location: wrong.html");
    } else {

    //Puts it into an array 
    while($info mysql_fetch_array$data )) 

    //Outputs the image and other data
    Echo "<img class=\"style1\" src=http://www.lostpetsplymouth.com/images/".$info['pname'] ." alt=\"Image\" align=\"center\" width=\"250px\" height=\"300px\" style=\"display:block;margin:0 auto;\" hspace=\"10px\" vspace=\"8px\"> <br>";
    Echo 
    "<p class=\"style3\">" $info['state'] . " " $info['type'] . " </p>";
    Echo 
    "<p class=\"style2\"><b>Area:</b> ".$info['area'] . " </p>";
    Echo 
    "<p class=\"style2\"><b>Details:</b> ".$info['desc'] . " </p>";
    Echo 
    "<p class=\"style3\"><b>If Seen Please Tel:</b> ".$info['tel'] . " </p>";

    }
    ?>
    </div>
    <div>
    <input type="button" value="Print this page"
    onclick="printpage()" />
    </div>
    <div>

    <input type="button" value="Cancel"
    onclick="index.html"/>
    </div>
    </body>
    </html> 
    Last edited by dougvcd; Apr 22, 2009 at 10:36. Reason: more info
    an old man of 60 trying to keep up with the youngsters he he
    http://lostpetsplymouth.net16.net

  2. #2
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2008
    Posts
    5,757
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Error messages are generally pretty unique and describe the general problem. So, what is the error message?

  3. #3
    SitePoint Addict
    Join Date
    Jun 2007
    Location
    Plymouth uk
    Posts
    313
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    it just shows a yellow triangle and says errors on page
    double clicked it and came up with some thing expected on line 51
    opened up in editor and line 51 is blank
    cheers
    Doug
    an old man of 60 trying to keep up with the youngsters he he
    http://lostpetsplymouth.net16.net

  4. #4
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2008
    Posts
    5,757
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That would be a javascript error, not php. Ie counts lines in ways you may not expect. It may be an external javascript file. You can temporarily remove lots of html to help you isolate the problem if needed.

  5. #5
    SitePoint Wizard REMIYA's Avatar
    Join Date
    May 2005
    Posts
    1,351
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Both buttons will generate errors.

    The first one expects a javascript function printpage(), that is not instantiated, and the second button because the onclick event attached to it is not a javascript source.

    use this for the second button:

    Code HTML4Strict:
    <input type="button" value="Cancel" 
    onclick="window.location.href='index.html'" />

  6. #6
    SitePoint Addict
    Join Date
    Jun 2007
    Location
    Plymouth uk
    Posts
    313
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks there buddy
    works fine now
    cheers
    Doug
    an old man of 60 trying to keep up with the youngsters he he
    http://lostpetsplymouth.net16.net


Bookmarks

Posting Permissions

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