djmartins Posted February 5, 2005 Report Share Posted February 5, 2005 (edited) Te ir probleema taada ka ja es nospiezu uz talak un man lapa ir kadi 3 vai vairak id vins atver visus id ar sakuma un turpinaajuma tekstu tacu man vajadzeetu lai vins atver konkreto id uz kura tiesi nospiezu.Kaa to izdariit? <?php echo("<table width=60%>"); //uztaisam table ... echo("<td colspan=3 align=center>$res[7]</td>"); echo("</tr>"); echo("</table>"); if (isset($_GET['talak'])) { echo("<table width=60%>"); //uztaisam table ... echo("<td colspan=3 align=center>$res[8]</td>"); echo("</tr>"); echo("</table>"); } else { echo '<a href="?talak=true">talak</a>'; } echo("<p> </p> "); } $ip = getenv("REMOTE_ADDR"); echo("<table>"); echo("<form method=\"post\" action=\"$PHP_SELF\" align=center>"); echo("<input type=hidden value=true name=\"talak\">"); ?> Edited February 5, 2005 by djmartins Link to comment Share on other sites More sharing options...
bubu Posted February 5, 2005 Report Share Posted February 5, 2005 Tas kods kautkā aizdomīgi nepareizs izskatās: 1) Tu lieto tikai $_GET['talak'], tad kāpēc formā jāliek POST mainīgais talak? 2) Tev ir tikai 2 atverošās { figūriekavas, bet ir 3 aizverošās } Tas vai tad ir sintaktiski korekti? 3) kas tas par dīvainu $res masīvu, kurš netiek inicializēts? 4) HTML kods nekorekts - ir tikai rindu aizverošie tagi </tr>, bet nav vispār atverošo <tr> ... Link to comment Share on other sites More sharing options...
djmartins Posted February 7, 2005 Author Report Share Posted February 7, 2005 Un kaa tad pareizi buutu jaaizskataas? Link to comment Share on other sites More sharing options...
Klez Posted February 7, 2005 Report Share Posted February 7, 2005 <? switch ($_GET['id']){ case 1: echo "izvadam kas paredzeets uz 1"; break; case 2: echo "izvadam kas paredzeets uz 2"; break; case 3: echo "izvadam kas paredzeets uz "; break; default: echo "Ja nav ne 1 ne 2 ne 3 tad raadam shito"; } ?> Link to comment Share on other sites More sharing options...
bubu Posted February 7, 2005 Report Share Posted February 7, 2005 Un kaa tad pareizi buutu jaaizskataas? 13467[/snapback] Es nezinu. Kā lai es saprotu, ko tavs kods tur dara? Link to comment Share on other sites More sharing options...
Recommended Posts