theHop 18 Newbie Poster

@andyy121

Arguments with other members aside, did correcting the spelling mistake solve the issue?

P.S remember. People who post answers on here are usually IT proffesionals that would normally charge a small fortune for the type of consultancy provided in here. yet they do it here for free. This can sometimes be a bit of trial and error which means people will sometimes give the wrong answer but not intentionally.

LastMitch commented: Right on Target! +3
theHop 18 Newbie Poster

on your mysql_fetch_assoc,(Line 35 above) you have spelt $results as $reults. (you missed an 's' out. that would explain both the warning and the notice.

theHop 18 Newbie Poster

Hi. To use the $_SESSION array you must start a session first. The very first thing on your file should fire the function session_start();

This needs to be right at the top of the file (before any output to the browser).

theHop 18 Newbie Poster

No problem...I have fell for that a few times. I think it was with background images too. glad you got it sorted. Please vote up my answer and mark as solved. : )

kevwood commented: great response. +0
theHop 18 Newbie Poster

Hi. your 'db.inc.php' only needs the php block in it. It doesn't need all the html in there.
So all that should be in that file is:

<?php
    $connect = mysql_connect ('localhost','root','') or die("Error connecting to  SQL");
    mysql_select_db('searchengine') or die("Error selecting database");
?>

*Note i have also added a space between your closing bracket ")" and the "or" statments.

Other than that. are you getting any specific errors when you run it in the browser. If so post the error.

theHop 18 Newbie Poster

So if I understand correctly, your folder structure is as follows.

index.html
css/main_style.css
images/buttons/main_link_bg.png

your css seems fine to me. the url function in css is relative to the css file it self. The only thing I can think is maybe the browser is loading cached versions of your other pages. Have you tried to refresh on the other pages. sometimes it's worth holding down the refresh key to get to force a new version of the page. Or just try them in a different browser to see if the BG image is still missing

theHop 18 Newbie Poster

Hi. Is the "fade()" function already written?

set your css for sec_1_svar_id so that the opacity is at 0. add the content with AJAX then call fade.

 function fadeUp(obj){
    if(typeof(obj) == "string"){
        obj = document.getElementById(obj);

    }

    var t;

    var opacity_counter = 0;

    var doFade = function(){

        obj.style.opacity = (opacity_counter/100);
        /* for IE */ obj.style.filter = "alpha(opacity=" + opacity_counter + ")";

        opacity_counter = opacity_counter + 10;           

        if(opacity_counter >= 100){
            /*normalise opacity */
            clearTimeout(t);
            obj.style.opacity = "1";
            obj.style.filter = "alpha(opacity=100)";    
            return;

        }else{
            t = setTimeout(doFade,50);

        }



    }

    doFade();


}

setTimeout(function(){
document.getElementById("sec_1_svar_id").innerHTML = sec_1;
fadeUp("sec_1_svar_id");
},300);

Is this what you were looking for?