Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [inne][PHP]Problem z podstronami
ciekawy30
post
Post #1





Grupa: Zarejestrowani
Postów: 108
Pomógł: 0
Dołączył: 2.10.2009
Skąd: bydgoszcz

Ostrzeżenie: (10%)
X----


mam taki kod:
<?php
if(!$add_site) exit;
?>
<META http-equiv="Content-Type" content="text/html; charset=iso-8859-2">
<html>
<head>
<title> moj</title><center>
<a href="index.php?go=glowna">glowna</a><br />
<a href="index.php?go=my">my</a><br />
<a href="index.php?go=wy">wy</a><br />
<a href="index.php?go=oni">oni</a><br />

</head>
</html>
problem w tym ze klikając na my na stronie głownej lub innej wyskakuje mi na strona główna a nie strona my?czemu?
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
ciekawy30
post
Post #2





Grupa: Zarejestrowani
Postów: 108
Pomógł: 0
Dołączył: 2.10.2009
Skąd: bydgoszcz

Ostrzeżenie: (10%)
X----


mam cos takiego
<?php
$go = $_GET['go'];
if ($_GET[go]=='wydarzenia'){} {
if(is_file("page/$go.html")) include "kontakt/$go.html";
else echo "<br />Nie ma takiej strony :-(";
}
else include "page/glowna.html";

i wyskakuje bład w lini gdzie jest else include "page/glowna.html";
Go to the top of the page
+Quote Post
d3f3nd3r
post
Post #3





Grupa: Zarejestrowani
Postów: 77
Pomógł: 6
Dołączył: 9.08.2008

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


Cytat(ciekawy30 @ 4.03.2010, 20:36:33 ) *
mam cos takiego
<?php
$go = $_GET['go'];
  if ($_GET[go]=='wydarzenia'){} {
if(is_file("page/$go.html")) include "kontakt/$go.html";
else echo "<br />Nie ma takiej strony :-(";
}
else include "page/glowna.html";

i wyskakuje bład w lini gdzie jest else include "page/glowna.html";

ten nawias nie jest tam gdzie powinien

acha jak dajesz else to też powinien być nawias



Ten post edytował d3f3nd3r 4.03.2010, 20:51:37
Go to the top of the page
+Quote Post

Posty w temacie


Closed TopicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 3.10.2025 - 20:40