-=HELLBENDER=- Posted December 8, 2006 Report Share Posted December 8, 2006 Ir 1 taada probleema kaa admin cp... Paslaik tikai maacos no php tapee... esmu itka izveidojis admin cp un nu vajag ustradiit password protectu BET KAA??? Kaads paliidz... Link to comment Share on other sites More sharing options...
andrisp Posted December 8, 2006 Report Share Posted December 8, 2006 - html formas - $_POST masīvs - if konstrukcija Precīzākus risinājumus vari atrast gūglē: http://www.google.lv/search?hl=lv&q=password+protect+php Link to comment Share on other sites More sharing options...
-=HELLBENDER=- Posted December 8, 2006 Author Report Share Posted December 8, 2006 Zinu ka POST!!! Bet ko lai raxta taja otrajaa neizmantojot datubaazi??? Link to comment Share on other sites More sharing options...
andrisp Posted December 8, 2006 Report Share Posted December 8, 2006 Būtu apskatījies pirmo linku manis dotajā gūgles rezultā, būtu jau atbildi dabūjis. Link to comment Share on other sites More sharing options...
v3rb0 Posted December 8, 2006 Report Share Posted December 8, 2006 session_start(); if($_POST['parole'] == 'rightīgā parole') $_SESSION['ielogojies'] = 'JĀ, $#@%!!!'; if(isset($_SESSION['ielogojies']) && $_SESSION['ielogojies'] == 'JĀ, $#@%!!!') { // ir ielogojies } else { // nav ielogojies } Link to comment Share on other sites More sharing options...
-=HELLBENDER=- Posted December 8, 2006 Author Report Share Posted December 8, 2006 Vinjs tagad reagjee uz visaam paroleem... Mans login.php <html> <body bgcolor="black"> <font color="yellow" <h2>Ievadi paroli!!!</h2> <form method="POST" action="check.php"> <input type="parole" name="parole" value="Ievadi savu veelamo niku un uspied enter!"> <input type="submit" /> </form> <p> <a href="http://reper.oo.lv/news.php"><img src="buttons/saakums.gif"></a> </p> Mans check.php <?php session_start(); if($_POST['parole'] == 'asdasdasd') $_SESSION['ielogojies'] = 'J?, $#@%!!!'; if(isset($_SESSION['ielogojies']) && $_SESSION['ielogojies'] == 'J?, $#@%!!!') { // ir ielogojies } else { // nav ielogojies } ?> Welcome... kkas ir nepareizi??? Link to comment Share on other sites More sharing options...
v3rb0 Posted December 8, 2006 Report Share Posted December 8, 2006 jā!!! to welcome textu liec tur kur pierakstīts komentārs ka ir ielogojies. Link to comment Share on other sites More sharing options...
-=HELLBENDER=- Posted December 8, 2006 Author Report Share Posted December 8, 2006 jā!!! to welcome textu liec tur kur pierakstīts komentārs ka ir ielogojies. aa thanks :D Kur tas buutu??? <?php session_start(); if($_POST['parole'] == 'asdasdasd') $_SESSION['ielogojies'] = 'J?, $#@%!!!'; if(isset($_SESSION['ielogojies']) && $_SESSION['ielogojies'] == 'J?, $#@%!!!') { Welcome (TE????) // ir ielogojies } Welcome (VAI TE???) else { Welcome... ( VAI TE????) // nav ielogojies } ?> A Link to comment Share on other sites More sharing options...
andrisp Posted December 8, 2006 Report Share Posted December 8, 2006 (edited) Un labāk arī būtu: if (nav ielogojies) { die(); // vai arī piem., header('Location: login.php'); } // Saturs PS. Tev vispār it kaut mazākā saprašana par kontrolstruktūrām ? Edited December 8, 2006 by andrisp Link to comment Share on other sites More sharing options...
Val Posted December 8, 2006 Report Share Posted December 8, 2006 <?php session_start(); if($_POST['parole'] == 'asdasdasd') $_SESSION['ielogojies'] = 'J?, $#@%!!!'; if(isset($_SESSION['ielogojies']) && $_SESSION['ielogojies'] == 'J?, $#@%!!!') { // ir ielogojies echo 'Nenormaali kruta - esi iekshaa...'; } else { // nav ielogojies echo 'neesi ielogojies, ibio'; } ?> Link to comment Share on other sites More sharing options...
-=HELLBENDER=- Posted December 8, 2006 Author Report Share Posted December 8, 2006 (edited) Hmm Bet kaa lai ielogojas atlasot no DB??? Piem db raxtits person data шlauris3722@inbox.lvtesting lauris3722@inbox.lv - e-pasts testing - parole Cerams ka saprataat :D Itka kkas liidziigs tam scriptam bet droshi vien jaizmaina 1 vieta :D ps. regjistreeshanos taisiiju peec shii- taka tur vajadziigs kkads ODBC kuru nemaaku ustadiit... http://www.w3schools.com/php/php_mysql_insert.asp protams ljoti daudzgo es izmainiiju... Ielogoshanaas itka peec odbc (es pat nez kas ats taads ir) http://www.w3schools.com/php/php_db_odbc.asp Edited December 8, 2006 by -=HELLBENDER=- Link to comment Share on other sites More sharing options...
-=HELLBENDER=- Posted December 8, 2006 Author Report Share Posted December 8, 2006 Ak tad neviens nezin <_< Link to comment Share on other sites More sharing options...
Stopp Posted December 8, 2006 Report Share Posted December 8, 2006 http://www.google.com/search?q=mysql+select http://www.google.com/search?q=mysql+fetch+php Link to comment Share on other sites More sharing options...
andrisp Posted December 8, 2006 Report Share Posted December 8, 2006 hellbender, labāk sāc tomēr ar http://www.google.lv/search?hl=lv&q=mysql+tutorial+php , jo tev nav nekādas saprašanas. Link to comment Share on other sites More sharing options...
neprasa Posted December 9, 2006 Report Share Posted December 9, 2006 <?php $a = "parole"; if ( $a == "parole" ) { echo 'tu esi ielogojies'; //te vel ko darit ja ir ielogojies } $b = "parole"; if ( $b /= parole) { echo 'tu neesi ielogojies'; } ?> Link to comment Share on other sites More sharing options...
Recommended Posts