The Most Active and Friendliest
Affiliate Marketing Community Online!

“Adavice”/  “1Win

how can I change CSS link using external php

amber.long83

New Member
affiliate
Hello,

any one can please tell me how can i change CSS link using external php
basically I am trying to change the link to my style sheet in the head of my index, by using an external php page with dropdown menu. Let's say someone selects "Style 3 - Green" from the dropdown and it automatically changes the link in the index to "style_green.css", is this possible, without using databases? I am trying to allow the user to select various css files without manually changing links in the index.

Thanks in advance.
 
hello

i think you want to make something visitor can choose their theme right? please correct me if i'm wrong


first you make like this

<?php
session_start();


if($style != '')
{
$ses = $_SESSION['style'] = ''$_GET['style']";
}

?>

<html>
<head>
<title> title 1 </title>
<link href="<?=$ses;?>" rel="stylesheet" type="text/css" />
</head>
-------------------------------------------------------------

then you just make a form and send the value of $style like green.css or red.css.

i hope it working
 
Last edited by a moderator:
hello

i think you want to make something visitor can choose their theme right? please correct me if i'm wrong


first you make like this

<?php
session_start();


if($style != '')
{
$ses = $_SESSION['style'] = ''$_GET['style']";
}

?>

<html>
<head>
<title> title 1 </title>
<link href="<?=$ses;?>" rel="stylesheet" type="text/css" />
</head>
-------------------------------------------------------------

then you just make a form and send the value of $style like green.css or red.css.

i hope it working

its work thanks lot for help
 
MI
Back