hocam olmadı yaa
isterseniz baştan adım adım yazın dediğim gibi çok yeniyim php de
page.php?id= hatası
13
●1.587
- 18-05-2008, 00:14:49
showMenuItem(1, 'Ana Sayfa', 1);showMenuItem(2, 'Hakkımızda', 1); </SCRIPT>
diyelimki bu üsteki menüne a.php yi göstermek için bir menü daha eklemek istiyorsunuz.
ve page.php alttaki gibi:
<?php $id=$_GET['id']; if ($id==1) { include("anasayfa.php"); }elseif ($id==2) { include("hakkimizda.php"); }else{ include("hata.php"); } ?>en üstteki javascript koduna showMenuItem(3, 'A Sayfası', 1); kodunu ekliyoruz.ilk parametreye 3 yazmamın sebebi 2 tane idli menüm var buda 3. menüm olduğu için id numarasını 3 olarak belirledim.
sonra page.php ye
}elseif ($id==3) { include("a.php"); }bloğunu eklememiz gerekiyor.
en son halleri ile:
javascript kodu:
showMenuItem(1, 'Ana Sayfa', 1);showMenuItem(2, 'Hakkımızda', 1);showMenuItem(3, 'A Sayfası', 1);
page.php dosyamız:
<?php $id=$_GET['id']; if ($id==1) { include("anasayfa.php"); }elseif ($id==2) { include("hakkimizda.php"); }elseif ($id==3) { include("a.php"); }else{ include("hata.php"); } ?>mantıken böyle.
Kolay Gelsin. - 18-05-2008, 08:23:25bu verdiğin kodlar php değil.vys adlı üyeden alıntı: mesajı görüntüle
page.php dosyasının içeriğini yazmazsan kimse sana yardımcı olamaz. senin verdiğin bu kodlar sadece menü gösterimi yapıyor gibi duruyor. - 18-05-2008, 13:48:56Üyeliği durdurulduben daha farklı bir yol buldum deneyecem ama istediğim gibi olursa çok güzel olur
page.php yi yazıyorum
<html> <head> <title>3nokta Havuz</title> <meta http-equiv='content-type' content='text/html; charset=iso-8859-9' /> <meta http-equiv='imagetoolbar' content='no' /> <meta name='author' content='hfghfghgf' /> <meta name='description' content='fghfghgfhfg' /> <meta name='generator' content='Galileo CMS' /> <meta name='doc-type' content='Web Page' /> <meta name='doc-rights' content='Copywritten Work' /> <meta name='Googlebot' content='index, follow' /> <meta name='keywords' content='fghfghfghfghfg' /> <meta name='owner' content='tasarım' /> <meta name='rating' content='general' /> <meta name='resource-type' content='document' /> <meta name='revisit-after' content='7' /> <meta name='robots' content='index, follow' /> <link rel='stylesheet' href='style/style.css' type='text/css' media='all' /> <script type='text/javascript' src='style/functions.js'></script> </head> <body> <table border="0" style="border-collapse: collapse" width="100%" cellpadding="0" height="100%"> <script type="text/javascript">showTop(1);</script> <tr> <td width="50" height="125" align="right"> <table border="0" style="border-collapse: collapse" cellpadding="0"> <tr> <td bgcolor="#2B76CE" width="20" height="125"> </td> </tr> </table> </td> <td width="720" height="125" bgcolor="#2144A0" valign="top"> <table border="0" style="border-collapse: collapse" width="100%" cellpadding="0"> <script type="text/javascript">showLogo('logo_3nokta.gif');</script> <tr> <td height="1" bgcolor="#2B76CE"><img border="0" src="img/1px.gif" width="1" height="1"></td> </tr> <tr> <td height="30"> <div align="center"> <table border="0" style="border-collapse: collapse" cellpadding="0"> <tr> <script type="text/javascript"> showMenuItem(1, 'Ana Sayfa', 1);showMenuItem(2, 'Hakkımızda', 1);showMenuItem(3, 'Renkler', 1);showMenuItem(4, 'Şirketimi', 1);showMenuItem(5, 'Sauna&Buhar Odası', 1);showMenuItem(6, 'Spa&Jacuzzi', 1);showMenuItem(7, 'Portföy', 1);showMenuItem(8, 'Bilgi Formu', 1);showMenuItem(9, 'İletişim', 0); </script></tr> </table> </div> </td> </tr> </table> </td> <td height="125" bgcolor="#2B76CE"> </td> </tr> <tr> <td width="50" height="12"></td> <td width="720" height="12"> <table border="0" style="border-collapse: collapse" cellpadding="0"> <tr> <td width="200" height="12" bgcolor="#00999D"></td> <td width="520" height="12" bgcolor="#1A4579"></td> </tr> </table> </td> <td height="12" bgcolor="#1A4579"></td> </tr> <tr> <td width="50" valign="top"> </td> <td width="720" valign="top" height="100%"> <table border="0" style="border-collapse: collapse" height="100%" cellpadding="0"> <tr> <td width="200" bgcolor="#00ABB0" valign="top" height="100%"> <script type="text/javascript"> startSubMenu(''); endSubMenu(); </script> </td> <td width="520" bgcolor="#2144A0" valign="top" height="100%"> <table border="0" style="border-collapse: collapse" width="100%" cellpadding="0"> <tr> <td height="80" bgcolor="#5177DB"> <img border="0" src="img/pagetop/foto_alt1.jpg" width="520" height="80"></td> </tr> <tr> <td height="19" valign="top"> </td> </tr> <tr> <td> <table border="0" style="border-collapse: collapse" width="100%" cellpadding="0"> <tr> <td width="20"> </td> <td><p class="tx"> </p></td> <td width="20"> </td> </tr> </table> </td> </tr> <tr> <td> </td> </tr> </table> </td> </tr> </table> </td> <td> </td> </tr> <tr> <td width="50" height="7"> <img border="0" src="img/1px.gif" width="1" height="1"></td> <td width="720" bgcolor="#0E1C43" valign="top" height="7"> <img border="0" src="img/1px.gif" width="1" height="1"></td> <td height="7"></td> </tr> <tr> <script type="text/javascript"> showFooter('adres', 'telefon', 'fax', 'info@domain.com', '<a class="ap" target="_blank" href="http://www.xxyy.com/">tasarım & uygulama<br>kaya</a>', 'Copyright 2008 Beyar İnşaat Ltd. Şti.', 1); </script> </tr> </table> </body> </html>