Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [php/css] problem z podpięciem stylu
-Gość_Mariusz_*-
post
Post #1





Goście







witam,
mam problem z podpięciem do tego pliku stylu css... (IMG:http://forum.php.pl/style_emoticons/default/sad.gif) nie mam pojęcia, w któym momencie się do niego odnieść, bo wyskakuje mi błąd :/

  1. <?php
  2. $user = "admin"; // Twój login
  3. $password = "pass"; // Twoje hasło
  4. if($login && $pass){
  5. if($login==$user && $pass==$password){
  6. session_register("admin");
  7. } else {
  8. echo "Błędne dane!";
  9. }
  10. }
  11.  
  12. // Settings //
  13. $phpself = $_SERVER["PHP_SELF"];
  14.  
  15. // Forms //
  16. $loginForm = "<form action=".$phpself."?mode=admin method=post>Login: <input type=text name=login><br>Hasło: <input type=password name=pass><br><input type=submit value=Zaloguj></form>";
  17.  
  18. // Script //
  19. $link = "adres";
  20. if(session_is_registered("admin")){
  21. switch ($_GET["mode"]){
  22. default:
  23. echo "<a href=".$link.">Link</a><br>";
  24. break;
  25. }
  26. } else {
  27. echo $loginForm;
  28. }
  29. ?>
Go to the top of the page
+Quote Post
gladiror
post
Post #2





Grupa: Zarejestrowani
Postów: 398
Pomógł: 0
Dołączył: 13.07.2005
Skąd: Lublin

Ostrzeżenie: (0%)
-----


gdzie wyskakuje blad, ktora linia??
Go to the top of the page
+Quote Post
-Gość_Mariusz_*-
post
Post #3





Goście







aktualnie tutaj nie ma błędu bo usunąłem ten fragment, w którym odnosiłem się do stylu... a jak na początku użyję
[html]<html>
<head>
<link href="gfx/style.css" rel="stylesheet" type="text/css">
</head>
<body>
<?php
...
?>
</body>
</html>

to się chrzani i wyskakuje błąd

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at E:\Program Files 2\VertrigoServ\_htdocs\podstrona\podstrona.php:6) in E:\Program Files 2\VertrigoServ\_htdocs\podstrona\podstrona.php on line 8

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at E:\Program Files 2\VertrigoServ\_htdocs\podstrona\podstrona.php:6) in E:\Program Files 2\VertrigoServ\_htdocs\podstrona\podstrona.php on line 8" title="Zobacz w manualu php" target="_manual
Go to the top of the page
+Quote Post
kresh
post
Post #4





Grupa: Zarejestrowani
Postów: 99
Pomógł: 2
Dołączył: 8.11.2005
Skąd: Kraków

Ostrzeżenie: (0%)
-----


Nagłówki wysyłamy zawsze na początku pliku. W związku z tym session_start(); musi być na początku pliku przed <html>

Ten post edytował kresh 28.06.2006, 23:00:10
Go to the top of the page
+Quote Post

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: 23.08.2025 - 02:14