![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 38 Pomógł: 0 Dołączył: 3.04.2009 Ostrzeżenie: (0%) ![]() ![]() |
Witam mam problem z funkcja IF oraz z metoda $_GET...
chce osiagnac efekt zaawansowanej strony PHP lecz zatrzymalem sie w pewnym miejscu oto kod : Kod: <?php if(!isset($_GET["spells"])){ echo "<span class='orange'><a href='?spells=1.1'>Arcane</a><br /> <a href='?spells=1.2'>Fire</a><br /> <a href='?spells=1.3'>Frost</a></span><br />"; $wynik1=mysql_query("select * from news ORDER BY `news_data` DESC"); while($rekord=mysql_fetch_array($wynik1)){ $nadawca=mysql_fetch_array(mysql_query("select user_login from users where user_id=".$rekord["news_autor"])); echo "<div id='news'> <div class='head'><a href='?news=".$rekord["news_id"]."'><span class='title'>".$rekord["news_temat"]."</span></a><br /> <span class='text'>".$nadawca["user_login"].", ".$rekord["news_data"]."</span></div><br /> ".$rekord["news_tresc"]."<br /> </div>"; } } else if($_GET["spells"] == 1.1){ $id=intval($_GET["spells"] == 1.1); $wynik=mysql_query("select * from spells_mag_arcane ORDER BY `level` ASC"); } else if($_GET["spells"] == 1.2){ $id=intval($_GET["spells"] == 1.2); $wynik=mysql_query("select * from spells_mag_fire ORDER BY `level` ASC"); } else if($_GET["spells"] == 1.3){ $id=intval($_GET["spells"] == 1.3); $wynik=mysql_query("select * from spells_mag_frost ORDER BY `level` ASC"); } if(isset($_GET["spells"])){ echo "<table> <tr> <td width=3%>Ikona</td> <td width=50%>Nazwa</td> <td width=5%>Level</td> <td width=5%>Szkoła</td> <td width=5%>Reagenty</td> <td width=5%>Otrzymywanie</td> <td width=5%>Skill</td> </tr>"; if(!mysql_num_rows($wynik))echo "<tr><td colspan=4 style='text-align:center'>Nie znaleziono żadnych zaklęć w tym dziale!</td></tr>"; while($rekord=mysql_fetch_array($wynik)){ echo "<tr> <td><a href='?spell=".$rekord["id"]."' onmouseover=".$rekord["span"]."ShowTT ('".$rekord["id"]."')".$rekord["span"]." onmouseout=".$rekord["span"]."HideTT()".$rekord["span"]."><span class='".$rekord["color"]."'><img src='".$rekord["ikona"]."'></span></a></td> <td><a href='?spell=".$rekord["id"]."' onmouseover=".$rekord["span"]."ShowTT ('".$rekord["id"]."')".$rekord["span"]." onmouseout=".$rekord["span"]."HideTT()".$rekord["span"]."><span class='".$rekord["color"]."'>".$rekord["nazwa"]."</span></a></td> <td>".$rekord["level"]."</td> <td>".$rekord["szkola"]."</td> <td>".$rekord["reagenty"]."</td> <td>".$rekord["otrzymywanie"]."</td> <td>".$rekord["skill"]."</td></tr>"; } echo "</table>"; } ?> chodzi mi oto jak mamy Kod: if(!isset($_GET["spells"])){ czy niedaloby sie zrobic czegos aby w jednej instrukcji, warunku dodac jeszcze inne $_GET czyli cos takiego : Kod: if(!isset($_GET["spells"]) or ($_GET["news"])){ (IMG:http://forum.php.pl/style_emoticons/default/questionmark.gif) potrzebne mi to bo chce cala strone oprzec o jedna index.php w ktorej beda wszystkie podstrony... prosze o pomoc i z gory wielkie dzieki CanoR |
|
|
![]() ![]() |
![]() |
Aktualny czas: 23.08.2025 - 03:41 |