Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [php] Prosta ksiega gości (PHP i MySQL)
richard
post 2.06.2009, 15:28:49
Post #1





Grupa: Zarejestrowani
Postów: 4
Pomógł: 0
Dołączył: 2.06.2009

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


Witam

mam problem po wgraniu na serwer dwóch plików index.php i config.php wyskakuje błąd: Parse error: syntax error, unexpected T_STRING in /home/users/richard/www/ksiega/index.php on line 44 czyli bład jest tutaj include('config.php');. ktoś ma pomysł jak to rozwiązać ?

Plik index.php
  1. <?php
  2.  
  3. if (isset($_POST['haslo']))
  4. {
  5.    SetCookie("haslo",$_POST['haslo']);
  6.    Header('Location: index.php?show=admin&zlehaslo=yes');
  7. }
  8.  
  9.   if (isset($_GET['show'])) $show=$_GET['show']; else $show='';
  10.   if (isset($_GET['show'])) $show=$_POST['show'];
  11.  
  12.   if ($show=='logout')
  13.   {
  14.    SetCookie('haslo','-');
  15.    Header('Location: index.php);
  16. }
  17. //-----------------------------------------------
  18. ?>
  19. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 2.0//EN" " TBD">
  20. <html xmlns="http://www.w3.org//2002/06/xhtml12"  xml:lang="en">
  21. <head>
  22.    <meta http-equiv="content-type" content="text/html;
  23.                charset=ISO-8859-2" />
  24.    <link rel="Stylesheet" href="style.css" type="text/css" />
  25.    <title>Księga Gości</title>
  26. </head>
  27. <body>
  28. <div class="tytul"><br />Ksiega Gości</div>
  29. <div class="podtytul">Zapraszam wszystkich do wpisania sie do mojej
  30. księgi gości.<br /><br /></div>
  31.  
  32. <hr />
  33.  
  34. <table border="0" width="60&"
  35.    style="margin-left:auto;margin-right:auto;">
  36. <tr><td>
  37.  
  38. <a href="index.php" class="m">Lista wpisów</a> &nbsp;|&nbsp;
  39. <a href="index.php?show=dodaj" class="m">Dodaj wpis do księgi
  40. gości</a> &nbsp;|&nbsp;
  41. <a href="index.php?show=admin" class="m">Panel administracyjny</a>
  42. <?php
  43.    //-------------------------------------------------------------
  44.     include('config.php');
  45.     include('funkcje.php');
  46.     if (isset($_COOKIE['haslo']) &&
  47.         $_COOKIE['haslo']==$config['haslo_admin'])
  48.            echo '&nbsp;|&nbsp; <a href="index.php?show=logout"
  49.                                class="m">Wyloguj</a>';
  50.     echo '<hr />';
  51.    
  52.     if ($show=='admin') include('panel_admin.php');
  53.     elseif ($show=='dodaj') include('panel_dodaj.php');
  54.     else include('panel_lista.php');
  55.    //-------------------------------------------------------------
  56. ?>
  57. </td></tr>
  58. </table>
  59.  
  60. <hr />
  61. <div class="stopka'>Copyright &copy; 2004 by Ja&#347; Kowalski</div>
  62. </body>
  63. </html>




plik config.php

  1. <?php
  2. $config['serwer']='adres serwera';
  3. $config['uzytkownik']='użytkownik';
  4. $config['haslo']='tajne';
  5. $config['baza']='moja_baza';
  6. $config['tabela']='ksiega1';
  7. $config['haslo_admin']='tajne';
  8. $config['poile']=10;
  9. $config['tworzenie_bazy']='
  10.    CREATE TABLE '.$config['tabela'].'(
  11.    nazwisko VARCHAR(35),
  12.    email VARCHAR(40),
  13.    data_wpisu DATETIME,
  14.    tresc BLOB,
  15.    id INT NOT NULL AUTO_INCREMENT,
  16.    PRIMARY KEY(id)
  17.     )';
  18. ?>


Ten post edytował erix 2.06.2009, 16:14:22
Powód edycji: [erix] przeniosłem
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: 14.08.2025 - 14:43