MārisL Posted December 12, 2007 Report Share Posted December 12, 2007 http://paste.php.lv/6576 Tātad profila labošana būs piemēram ?=$lietotaja_id Kā varētu izveidot lai pārbauda vai tās lapas id sakrīt ar lietotāja id? Piem. Es ieeju profils.php?l=48 un mans id ir 49, tad es lapai netieku klāt, vai vēl labāk tiektu atmests atpakaļ uz sev vajadzīgo lapu if($row[id] == ??? Link to comment Share on other sites More sharing options...
andrisp Posted December 12, 2007 Report Share Posted December 12, 2007 if ($lapas_id == $lietotaja_id) ? Lapas ID taču māki dabūt ? Lietotāja ID ? Link to comment Share on other sites More sharing options...
MārisL Posted December 12, 2007 Author Report Share Posted December 12, 2007 lapas_id ir kaut kas jauns... ;[ Link to comment Share on other sites More sharing options...
andrisp Posted December 12, 2007 Report Share Posted December 12, 2007 Lapas ID taču tu padod caur URL. Link to comment Share on other sites More sharing options...
MārisL Posted December 12, 2007 Author Report Share Posted December 12, 2007 Nu jā, bet doma tāpat nav skaidra. :\ Link to comment Share on other sites More sharing options...
andrisp Posted December 12, 2007 Report Share Posted December 12, 2007 (edited) $lapas_id = $_GET['l']; // Es pieņemu, ka tas ir mazais L burts if (empty($_SESSION['lietotaja_id']) || $_SESSION['lietotaja_id'] != $lapas_id) { // redirekteejam un nomirstam (die()) } Edited December 12, 2007 by andrisp Link to comment Share on other sites More sharing options...
MārisL Posted December 12, 2007 Author Report Share Posted December 12, 2007 paldies. Darīts Link to comment Share on other sites More sharing options...
Recommended Posts