No logro enviar satisfactoriamente informacion desde el index hacia un archivo .css.php con los CSS de la pagina.
Lo he intentado enviando los datos por variable comun y por GET:
Código PHP:
echo "
<link rel='stylesheet' type='text/css' href='/css/busca.css.php?q=$q&color1=$color1&color2=$color2'>";
Código PHP:
session_start(); // inicio Sesion
$_SESSION['color_btn_buscar1'] = '#75C5F0'; // #39B4C6
$_SESSION['color_btn_buscar2'] = '#D5157B'; // #84C225
Les muestro el archivo .css.php a ver si ven un problema de HEADERS o que ven:
<?
header("Content-type: text/css");
$q = $_GET['q'];
function automargin(){
if (isset($q)) echo "20px"; else echo "44px";
}
// #39B4C6
// #84C225
$boton1 = $_GET['boton1'];
$boton2 = $_GET['boton2'];
Código:
?> {float:left; color:#fff; } .btn { display:inline-block; padding:4px; width:86px; height:30px; border:1px solid #000; background:<?= $boton1; ?>; color:#fff; font-weight:bold; cursor:pointer; margin-right:8px; margin-left:0px ;margin-top:<? automargin(); ?>; ;margin-bottom:20px' } .btn2 { display:inline-block; padding:4px; width:86px; height:30px; border:1px solid #000; background:<?= $boton2; ?>; color:#fff; font-weight:bold; cursor:pointer; margin-right:8px; margin-left:0px ;margin-top:<? automargin(); ?>; ;margin-bottom:20px' } .searchBtn { margin-left:0px; float:left}
GRACIAS desde ya!!!!!!!
![Afirmando](http://static.forosdelweb.com/fdwtheme/images/smilies/afirmar.gif)