Jump to content

PHP to HTML page


Jbert2

Recommended Posts

I am working on a Photography project. I have an HTML page with an image and several links. Each link is associated with a ( .php ) page. The script on the php page will display the the image in another mode like " Black and White" Right now the only way to get back to the main page is use the Browser Back button. I have search everywhere to find

 

How to insert a link back to, re display the main HTML page from a PHP page. I could use a php menu system for each page but did not want to do that here. Here is partial html code

 

<UL>
<LI><a href="http://localhost/kong.php">Grayscale</A>
<LI><a href="http://localhost/img2neg.php">Negative</A>

 

When kong.php is run the page only displays kong in grayscale and that is it.

 

 

 

Any help is appreciated.

 

 

JIM

 

 

Link to comment
https://forums.phpfreaks.com/topic/112276-php-to-html-page/
Share on other sites

Thanks ACE, Here is the ending of the code, got the same parse error

 


// get the Value from the RGB value
               
                $g = round(($rr + $gg + $bb) / 3);
               
                // grayscale values have r=g=b=g
               
                $val = imagecolorallocate($im, $g, $g, $g);
               
                // set the gray value
               
                imagesetpixel ($im, $i, $j, $val);
        }
}

header('Content-type: image/jpeg');
imagejpeg($im);



echo <a href="http://localhost/img2neg.html">Some Page</A>;

 

?>

 

Link to comment
https://forums.phpfreaks.com/topic/112276-php-to-html-page/#findComment-576575
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.