Uldeens Posted November 14, 2004 Report Share Posted November 14, 2004 Man ir komentu pievienosanas forma add.php... Kad spiez submit dati ar post tiek sutiti uz add.php un tad ir redirects header("Location: http://xxx.xxx.lv/add.html"); Man vajag taja location vietaa lai butu redirects tipa back(uz lapu no kuras naacis) Paldies.. Link to comment Share on other sites More sharing options...
fassko Posted November 14, 2004 Report Share Posted November 14, 2004 (edited) ar javascript <a href="javascript: history.go(-1)">Atpakalj</a> Edited November 14, 2004 by fassko Link to comment Share on other sites More sharing options...
Uldeens Posted November 14, 2004 Author Report Share Posted November 14, 2004 Bet Vajag lai automaatiski iet atpakal... Link to comment Share on other sites More sharing options...
Aleksejs Posted November 14, 2004 Report Share Posted November 14, 2004 Šitā: header('Location: ' . $_SERVER['HTTP_REFERRER']); Bet ņem vērā, ka klients var arī speciāli dot nepareizu referrer'i... Link to comment Share on other sites More sharing options...
bubu Posted November 15, 2004 Report Share Posted November 15, 2004 Ja jau tā lapa, kurā ir forma saucās add.php, tad kāpēc nevar šādi: header("Location: http://xxx.xxx.lv/add.php"); Link to comment Share on other sites More sharing options...
Venom Posted November 15, 2004 Report Share Posted November 15, 2004 $_SERVER['HTTP_REFERER'] ar vienu R visur, nb. var būt empty Link to comment Share on other sites More sharing options...
blackhalt Posted November 15, 2004 Report Share Posted November 15, 2004 piemeeram lapā add.php?lapa=3 $dod=$_SERVER['QUERY_STRING']; ... formā hidden lauks: <input type="hidden" name="kur" value="$dod" /> $kur vērtība būs lapa=3 tad met atpakalj uz add.php + tas $kur vērtība tas sanaaktu ./add.php?$kur kas ir ./add.php?lapa=3 Nū un to $kur vērtību, lai vinja nav tik "plika" varētu piemēram apstrādāt ar base64_encode base64_decode cerams, ka iraid saprotami kā es domāj ;) Link to comment Share on other sites More sharing options...
Aleksejs Posted November 15, 2004 Report Share Posted November 15, 2004 $_SERVER['HTTP_REFERER'] ar vienu R visur, nb. var būt empty He, tiešām (-; Nokopēju bez pārbaudīšanas no vienas no vecajām tēmām :S Link to comment Share on other sites More sharing options...
Uldeens Posted October 6, 2006 Author Report Share Posted October 6, 2006 oo.Noveeloti bet paldies par atbildeem :) Vajadzeja automatisko redirectu un mekleju searchaa atradu so pameginaju iet tikai tad ieveroju ka pats to esu prasiijis :)) Link to comment Share on other sites More sharing options...
Recommended Posts