Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> znow blad
trucksweb
post 16.02.2006, 19:28:45
Post #1





Grupa: Zarejestrowani
Postów: 1 199
Pomógł: 31
Dołączył: 22.03.2004
Skąd: Warszawa

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


Cytat
Parse error: parse error in c:\usr\krasnal\www\kcms\login.php on line 44


taki blad wywala w tym pliku:
  1. <?php session_start();
  2. $_SESSION['logged'] = 0;
  3.  
  4. if (isset($_POST['submit']))
  5. {
  6.  if ($_POST['username'] == "a" && 
  7.  $_POST['password'] == "a") 
  8.  {
  9.  $_SESSION['logged'] = 1;
  10.  header ("Refresh: 2; URL=\"test.php\"");
  11.  echo "Zalogowano...";
  12.  }
  13.  else
  14.  {
  15.  
  16.  
  17.  
  18.  
  19. include('config.php');
  20. //include('module/news.inc.php');
  21.  
  22. #=====================================================#
  23.  
  24. function site_main() {
  25.  
  26.  
  27.  
  28.  
  29. main_title_open();
  30. echo 'Panel Administratora';
  31. main_title_close();
  32.  
  33. main_text_open();
  34. echo '<br>';
  35. echo 'Brak autoryzacji';
  36. echo '<form action="login.php" method="post">';
  37. echo '<input type="hidden" name="redirect" value="' . $_POST[ 'redirect' ] . '">';
  38. echo 'nick:<input type="text" name="username"><br>';
  39. echo 'haslo <input type="password" name="password"><br><br>';
  40. echo '<input type="submit" name="submit" value="Zaloguj" >';
  41. echo '</form>';
  42.  
  43.  }
  44.  } else {
  45.  
  46.  
  47. if (isset($_GET['redirect']))
  48.  {
  49. $redirect = $_GET['redirect'];
  50. }
  51. else
  52. {
  53. $redirect = "index.php";
  54. }
  55.  
  56.  
  57.  
  58.  
  59. echo '<form action="login.php" method="post">';
  60. echo '<input type="hidden" name="redirect" value="' . $_GET['redirect'] . '">';
  61. echo 'nick:<input type="text" name="username"><br>';
  62. echo 'haslo <input type="password" name="password"><br><br>';
  63. echo '<input type="submit" name="submit" value="Zaloguj" >';
  64. echo '</form>';
  65.  
  66.  }
  67.  
  68.  //include 'login2.php'; 
  69.  
  70. main_text_close();
  71.  
  72. }
  73.  
  74.  
  75.  
  76.  
  77. #=====================================================#
  78.  
  79.  
  80. include("theme/mg/index.php");
  81. ?>


dlaczego??

Ten post edytował trucksweb 16.02.2006, 19:54:25


--------------------
Rozmawia dwóch dyrektorów:
- Jaki jest twój ideał sekretarki?
- 20-letnia dziewczyna z 30-letnim doświadczeniem.
Go to the top of the page
+Quote Post

Posty w temacie


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

 



RSS Wersja Lo-Fi Aktualny czas: 19.07.2025 - 06:03