Can't reload or refresh index.php

I have been working on rewriting my site needless to say my old one needed much improvement. I’m trying to write my entire site into 1 php file so that web bots can read all the text. Everything was going good until I put in my menus button code. Now if nothing else is in IE it will load but if you try to refresh or click on any of the buttons which reloads the index.php I get a blank screen. I have even tryed to take the new code out and I’m still having the problem. Here is the whole code if you need help reading it let me know but I think I have enough tags in it.

[php]

\"Yellow
KC Computers LLC.
Currently Ranked
Meriden Computer Repair
Vote For Us VOTING ENDS:
0 00 :00 :00
    See all 0 Votes
    ");

    print ("
    ");

    if ($a==“3”){
    $bar=(“images\buttons\purple\bar.gif”);
    }
    else {
    $bar=(“images\buttons\blue\bar.gif”);
    }
    print ("
    ");
    print ("<img src="".$bar."" width= “100%” height = “50%”>");
    print ("
    ");

    // backlink

    <?php // THE FOLLOWING BLOCK IS USED TO RETRIEVE AND DISPLAY LINK INFORMATION. // PLACE THIS ENTIRE BLOCK IN THE AREA YOU WANT THE DATA TO BE DISPLAYED. // MODIFY THE VARIABLES BELOW: // The following variable defines whether links are opened in a new window // (1 = Yes, 0 = No) $OpenInNewWindow = "1"; // # DO NOT MODIFY ANYTHING ELSE BELOW THIS LINE! // ---------------------------------------------- $BLKey = "WE00-14V5-E3D5"; if(strlen($_SERVER['SCRIPT_URI'])){ $_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_URI'].((strlen($_SERVER['QUERY_STRING']))?'?'.$_SERVER['QUERY_STRING']:''); } if(!strlen($_SERVER['REQUEST_URI'])){ $_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'].((strlen($_SERVER['QUERY_STRING']))?'?'.$_SERVER['QUERY_STRING']:''); } $QueryString = "LinkUrl=".urlencode((($_SERVER['HTTPS']=='on')?'https://':'http://').$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']); $QueryString .= "&Key=" .urlencode($BLKey); $QueryString .= "&OpenInNewWindow=" .urlencode($OpenInNewWindow); if(intval(get_cfg_var('allow_url_fopen')) && function_exists('readfile')) { @readfile("http://www.backlinks.com/engine.php?".$QueryString); } elseif(intval(get_cfg_var('allow_url_fopen')) && function_exists('file')) { if($content = @file("http://www.backlinks.com/engine.php?".$QueryString)) print @join('', $content); } elseif(function_exists('curl_init')) { $ch = curl_init ("http://www.backlinks.com/engine.php?".$QueryString); curl_setopt ($ch, CURLOPT_HEADER, 0); curl_exec ($ch); if(curl_error($ch)) print "Error processing request"; curl_close ($ch); } else { print "It appears that your web host has disabled all functions for handling remote pages and as a result the BackLinks software will not function on your web page. Please contact your web host for more information."; } ?>
          </p>
          <p>&nbsp;   <?php
    

    // THE FOLLOWING BLOCK IS USED TO RETRIEVE AND DISPLAY LINK INFORMATION.
    // PLACE THIS ENTIRE BLOCK IN THE AREA YOU WANT THE DATA TO BE DISPLAYED.

    // MODIFY THE VARIABLES BELOW:
    // The following variable defines whether links are opened in a new window
    // (1 = Yes, 0 = No)
    $OpenInNewWindow = “1”;

    // # DO NOT MODIFY ANYTHING ELSE BELOW THIS LINE!
    // ----------------------------------------------
    $BLKey = “T2ZZ-4W3N-2H72”;

    if(strlen($_SERVER[‘SCRIPT_URI’])){
    $_SERVER[‘REQUEST_URI’] = $_SERVER[‘SCRIPT_URI’].((strlen($_SERVER[‘QUERY_STRING’]))?’?’.$_SERVER[‘QUERY_STRING’]:’’);
    }

    if(!strlen($_SERVER[‘REQUEST_URI’])){
    $_SERVER[‘REQUEST_URI’] = $_SERVER[‘SCRIPT_NAME’].((strlen($_SERVER[‘QUERY_STRING’]))?’?’.$_SERVER[‘QUERY_STRING’]:’’);
    }

    $QueryString = “LinkUrl=”.urlencode((($_SERVER[‘HTTPS’]==‘on’)?‘https://’:‘http://’).$_SERVER[‘HTTP_HOST’].$_SERVER[‘REQUEST_URI’]);
    $QueryString .= “&Key=” .urlencode($BLKey);
    $QueryString .= “&OpenInNewWindow=” .urlencode($OpenInNewWindow);

    if(intval(get_cfg_var(‘allow_url_fopen’)) && function_exists(‘readfile’)) {
    @readfile("http://www.backlinks.com/enginec.php?".$QueryString);
    }
    elseif(intval(get_cfg_var(‘allow_url_fopen’)) && function_exists(‘file’)) {
    if($content = @file("http://www.backlinks.com/enginec.php?".$QueryString))
    print @join(’’, $content);
    }
    elseif(function_exists(‘curl_init’)) {
    $ch = curl_init ("http://www.backlinks.com/enginec.php?".$QueryString);
    curl_setopt ($ch, CURLOPT_HEADER, 0);
    curl_exec ($ch);

    if(curl_error($ch))
        print "Error processing request";
    
    curl_close ($ch);
    

    }
    else {
    print “It appears that your web host has disabled all functions for handling remote pages and as a result the BackLinks software will not function on your web page. Please contact your web host for more information.”;
    }
    ?>

    make money with your web site

    Login


    e-Mail:
    Password:

    Tweet

    [/php]

    Here is the code that I had added that started the problems

    [php]
    function mid($a){
    print ("<td width=“66” valign=“top”>");
    //print ("");
    // Sets up th buttons at the top of the screen
    //print ("<form id=“form1” name=“form1” method=“post” action=“index.php”>");
    //print ("<input type=“image” src=“images\buttons\blue\hc.gif” alt=“Submit button” name=“home” id=“home” >");
    //print ("<input type=“image” src=“images\buttons\blue\suc.gif” alt=“Submit button” name=“services” id=“services” >");
    //print ("<input type=“image” src=“images\buttons\blue\buc.gif” alt=“Submit button” name=“blog” id=“blog” >");
    //print ("<input type=“image” src=“images\buttons\blue\gbuc.gif” alt=“Submit button” name=“gb” id=“gb” >");
    //print ("<input type=“image” src=“images\buttons\blue\qtuc.gif” alt=“Submit button” name=“qt” id=“qt” >");
    //print ("<input type=“image” src=“images\buttons\blue\cuuc.gif” alt=“Submit button” name=“cu” id=“cu” >");
    //print ("");
    //print ("");
    print ("");
    }
    [/php]

    Thank you for your help
    Christopher J. Crandall

    your placing php with html but your not switching between the 2: the following is html then your using php but you haven’t told the browser to expect any php so it’s not being processed when ever your using php you need to open it with <?php then to close it use ?>

    [php]

    session_start(); // Starts session so that the variables can be read [/php]

    [php]

    <?php session_start(); // Starts session so that the variables can be read [/php]

    I figured it out it was actually the if statement at the end I forgot that what I was working on was just for when you first enter the site so any refresh or click would show up as a blank screen because I have nothing there yet lol.

    Thank you again
    Christopher J. Crandall

    ps. this is why proof reading is so important :smiley:

    <?php> <?>

    is the same as

    :smiley:

    You learn something new everyday :smiley: but why do it this way?

    just matter of prefrence lol I write the whole thing in php and it’s easier for me to tell apart from other scripts like java script 8)

    Sponsor our Newsletter | Privacy Policy | Terms of Service