blackhalt Posted February 2, 2004 Report Share Posted February 2, 2004 reku skripts: http://paste.php.lv/729/ viss ir itkā normaļno un vienkārši, bet nevaru izbēgt no problēmas, ka mainīgā vērtības var ierakstīt pa taisno brouzerī nu gribu izbēgt no šitā varianta: index.php?username=a&password=b un skripts nostrādā. Māģināju darīt tā, ka pirms nav nekas ierakstīts lauki ir $_POST, bet kad ir ierakstīts tad uz $_GET, bet tāds variants strādā tikai uz IE. uz Firebird tika uzkatīts ka mainīgais paliek $_POST līdz ar to nekādi cepumi nenolasijās. Pagaidām neizdodas apslēpt to fišku ... ko darīt? Link to comment Share on other sites More sharing options...
рпр Posted February 2, 2004 Report Share Posted February 2, 2004 spriezjot peec 4. rindas tev globaalie mainiigie ir on. tapeec straadaa gan get, gan post. Link to comment Share on other sites More sharing options...
Gacha Posted February 2, 2004 Report Share Posted February 2, 2004 nezinu vai paliidzees, bet paskaties šeit Link to comment Share on other sites More sharing options...
Klez Posted February 2, 2004 Report Share Posted February 2, 2004 (edited) nu ja tev der shitaads. tipa raxti usernami un paasw un ja ir pareizs tad ok $usern = $HTTP_POST_VARS['usern']; $parole = $HTTP_POST_VARS['parole']; $ok = $HTTP_POST_VARS['ok']; echo '<form action="" name="" method="post">'; echo '<input type="text" name="usern"><br>'; echo '<input type="password" name="parole"><br>'; echo '<input type="submit" name="ok" value="log in">'; echo '</form>'; if ((isset($ok)) && ($parole == "abcd") && ($usern == "username")){ echo "<script>window.location='lapa.php'</script>"; //ja jusername ir pareizs un parole arii tad tu tiec paarsviestc uz lapu lapa.php ja ne tad izmet error }else { echo "error"; } ;) Edited February 2, 2004 by Klez Link to comment Share on other sites More sharing options...
рпр Posted February 2, 2004 Report Share Posted February 2, 2004 juus manuaaljus vispaar lasat? http://lv.php.net/manual/en/features.http-auth.php Link to comment Share on other sites More sharing options...
blackhalt Posted February 3, 2004 Author Report Share Posted February 3, 2004 nu ja tev der shitaads. tipa raxti usernami un paasw un ja ir pareizs tad ok $usern = $HTTP_POST_VARS['usern']; $parole = $HTTP_POST_VARS['parole']; $ok = $HTTP_POST_VARS['ok']; echo '<form action="" name="" method="post">'; echo '<input type="text" name="usern"><br>'; echo '<input type="password" name="parole"><br>'; echo '<input type="submit" name="ok" value="log in">'; echo '</form>'; if ((isset($ok)) && ($parole == "abcd") && ($usern == "username")){ echo "<script>window.location='lapa.php'</script>"; //ja jusername ir pareizs un parole arii tad tu tiec paarsviestc uz lapu lapa.php ja ne tad izmet error }else { echo "error"; } ;) a kursh man liedz pa taisno apmekleet to uberslepeno lapa.php ? :) Link to comment Share on other sites More sharing options...
blackhalt Posted February 3, 2004 Author Report Share Posted February 3, 2004 juus manuaaljus vispaar lasat?http://lv.php.net/manual/en/features.http-auth.php Šo to lasam http://httpd.apache.org/docs-2.0/howto/htaccess.html bet man šoreiz nevaig HTTP autorizāciju ;) Link to comment Share on other sites More sharing options...
blackhalt Posted February 3, 2004 Author Report Share Posted February 3, 2004 Taa viss skaidrs: Cepumos paroles glabāt nedrīkst nekādā veidā ;) Link to comment Share on other sites More sharing options...
Gacha Posted February 3, 2004 Report Share Posted February 3, 2004 Nu a kaa tad lai uztaisa, lai lietotājs varētu staigāt pa slēgtām lapām, lai nebūtu visu laiku parole jaievada? Varbūt uz 20min ievadītu informaciju atsevišķā mysql teiblā un tad uz logout tas tiktu izdzēsts. varbūt taa? Link to comment Share on other sites More sharing options...
Aleksejs Posted February 3, 2004 Report Share Posted February 3, 2004 apskaties manuālī sadaļu par sesijām ;) Link to comment Share on other sites More sharing options...
blackhalt Posted February 3, 2004 Author Report Share Posted February 3, 2004 (edited) apskaties manuālī sadaļu par sesijām ;) he, paldies laikam kaut kas sāk iznākt tā kā man vajag ;) http://paste.php.lv/732 a šaise vienu } aizmirsu tur ielikt . Edited February 3, 2004 by blackhalt Link to comment Share on other sites More sharing options...
Recommended Posts