Hey guys, Just wondered if someone could tell me how to make this echoed DIV dissapear.

Here's my code with an explination:

<?php 
session_start(); 
 
if (isset($_GET['beginCount'])) {
    $_SESSION['countView'] = true;
}

if ($_SESSION['countView']) {
    $_SESSION['count']++;
}

if (($_SESSION['count'] % 5 == 0) && ($_SESSION['countView'])) { 
        echo '<a href="http://google.com" title="x" id="xavisys-logo" TARGET="_blank" >x</a>';

//The link above needs to disappear once it's been clicked. I know you can use JavaScript, but is there any other methods? It's just if someone has JavaScript disabled, it'll be rendered useless [kind of]. I suppose I could notify the people without it enabled to do 'x' instead, but just wondered how you'd go about doing this?//

}
?>

<?php
if((isset($_GET['end'])) && ($_GET['end'] == "yes")) {
    //session_destroy();
    $_SESSION['countView'] = false;
}
?>

Thanks for any help

EDIT // I could easily echo a DIV if it makes this any easier, just a thought.

You have all the tools and information you need to be able to figure this out. Everything you need is already on the script you just posted.

Remove TARGET="_blank" and turn off the page caching

You have all the tools and information you need to be able to figure this out. Everything you need is already on the script you just posted.

I agree I probably have to info to do it, but I have no idea how to go about making something happen after the links clicked. But I'll keep looking.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.