Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Styl jako zmienna w adresie., Jak to zrobić?
-Tarr-
post
Post #1





Goście







Mam problem: jak zrobić , żeby ktoś na stronie mógł wybrać styl CSS, i żeby ten wybór zapisywało najlepiej jako ciasteczko. Adres wyglądałby wtedy jakoś tak: index.php?podstrona=x&styl=y . Podstronyw linkach wpisuję ręcznie, ale styl byłby stały dla każdej. Mam nadzieję, że napisałem to jasno.

Z góry dzięki za pomoc.
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
-Tarr-
post
Post #2





Goście







Wywala mi błąd:
Cytat
Warning: Cannot modify header information - headers already sent by (output started at /srv/www/htdocs/user/html/index.php:2) in /srv/www/htdocs/web125/html/p4/index.php on line 12
, czyli przy
  1. <?php
  2. setcookie( 'styleId', $intStyleId, time() + 60 * 60 * 24 );
  3. ?>
(IMG:http://forum.php.pl/style_emoticons/default/sad.gif)
Przeniosłem
  1. <link rel="stylesheet" type="text/css" href="style_<?php echo $intStyleId; ?>.css" />
do head i nic nie dało (IMG:http://forum.php.pl/style_emoticons/default/sad.gif)
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 2.10.2025 - 23:05