Grow your CSS skills. Land your dream job.

FancyBox error when using PHP. Any ideas?

  • # December 14, 2012 at 11:17 am

    just going to share my code and see if anyone can spot what’s causing this.

    The error reads:
    “The requested content cannot be loaded.
    Please try again later.”

    http://i.imgur.com/1sD8J.png

    **ShowAll.PHP:**

    < ?
    include_once “db.php”;
    session_start();
    $gid=$_SESSION;
    $result = mysql_query(“SELECT id,groupid FROM images where gid=’”.$gid.”‘ and imagetype=’1′ ORDER BY id”);
    print(”

    “);
    $j=0;
    print(“

    My Gallery

    “);
    while($row = mysql_fetch_array($result)){
    if ($j==6){
    $j=0;
    print(“

    “);
    print(“

    “);
    print(“
    “);
    print(“

    “);
    print(“

    “);
    $j++;
    }else{
    print(“

    “);
    print(“

    “);
    print(“

    “);
    $j++;
    }
    }
    print(“

    “);?>

    **largeimage.php:**

    < ?php

    $groupid=$_GET;

    print(” “);

    ?>

    **showimagelarge.php:**

    include_once “db.php”;

    session_start();

    $gid=$_SESSION;

    header(‘Content-type: image/jpeg’);

    $query = “SELECT image from images where groupid=”. intval($_GET["groupid"]).” and gid=’”.$gid.”‘ and imagetype=’2′”;

    $rs = mysql_fetch_array(mysql_query($query));

    echo base64_decode($rs["image"]);

    ?>

    **showimage.php:**

    include_once “db.php”;

    session_start();

    $gid=$_SESSION;

    header(‘Content-type: image/jpeg’);

    $query = “SELECT image from images where id=”. intval($_GET["id"]).” and gid=’”.$gid.”‘”;

    $rs = mysql_fetch_array(mysql_query($query));

    echo base64_decode($rs["image"]);

    ?>

    # December 14, 2012 at 11:17 am

    Also, my initialization of FancyBox is:

    __
    # December 14, 2012 at 8:37 pm

    That error is not produced by the code you posted.

    Maybe it’s from fancybox?

    # December 15, 2012 at 9:56 pm

    Have you checked your console? Anything going on in there?

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".