Results 1 to 3 of 3
  1. #1

    Question php layout changer WITH IMAGES

    i made a layout changer that is fully functionally using the tutorial at but i would like to know how to make images also change when the layout is changed

  2. #2
    Join Date
    Jun 2004
    Digital Texas
    if ($layout == 1) {
    echo '<img src="layout_img1.jpg">';
    } elseif ($layout == 2) {
    echo '<img src="layout_img2.jpg">';

    etc. if u give more details on how ur layout changer works, I can give u some better code to fit ur needs.

  3. #3
    i ahve a file called switc.php where the cookie is that looks like this

    setcookie ('sitestyle', $_GET['set'], time()+15768000,
    '/', '', '0');
    header("Location: $HTTP_REFERER");

    then on the page where the layout changes i have this in the head of the html where gof is the name of the default css/layout to load

    <link rel="stylesheet" type="text/css"
    media="screen" title="GOF" href="<?php echo
    (!$sitestyle)?'gof':$sitestyle ?>.css" />

    with these two bits of code i link my links that change the code like this where hbp1 is another css/layout

    <a href="./switch.php?set=hbp1">link</a>

    all the css files that it calls on are just in the same directory

    ok so thats how my changer works now i have a question on that code u gave me where exactly to i put that?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts