Benvenuto Posted January 17, 2004 Report Share Posted January 17, 2004 <form method="post" action="index.php?cat=search"> <input type="text" name="q" size="30" value=""> <input type="submit" value="Meklēt!" name="submit"> </form> visparastaakaa forma, bet kad ievadu tanii tekstu un nospiezhu enteri, parametri netiek padoti taalaak uz index.php?cat=search, bet konkreetaa lapa, kur atrodas forma, vienkaarshi refreshojas. seezhu un njifiga nesaprotu kaapeec taa. vai kaadam ir idejas? Link to comment Share on other sites More sharing options...
jb4 Posted January 18, 2004 Report Share Posted January 18, 2004 Formas action ir index.php. Ja ir POST forma, tad GET variabļus neskatās (tātad cat netiek nolasīts). Ja vēlies, lai $_REQUEST['cat']=='search', uztaisi formā slēpto lauciņu: <input type="hidden" name="cat" value="search" /> Link to comment Share on other sites More sharing options...
hu_ha Posted January 18, 2004 Report Share Posted January 18, 2004 nu ja shitais kods tev atrodas index.php failaa, tad logjiski ka uz sho failu arii tiks posteeti dati - taatad sanaak refresh index.php == index.php?car=search to cat veertiibu jau izmanto tikai $_GET[cat] un nevis post Link to comment Share on other sites More sharing options...
blackhalt Posted January 18, 2004 Report Share Posted January 18, 2004 var jau arii shitaa te: <form method="get" action="index.php?cat=search"> <input type="text" name="q" size="30" value="" /> <input type="submit" value="Mekle-t!" name="submit" /> </form> <?php $q=$_GET['q']; echo "$q"; ?> ... nu tipa pataudzinjsh ;) Link to comment Share on other sites More sharing options...
Recommended Posts