Loading ...
Sorry, an error occurred while loading the content.

Re: [php_greek] authentication and redirection

Expand Messages
  • Gonik
    xmm genikotites :P ayto ginetai kai me .htaccess standar alla den ksero pos :P klasikos windoze user :s teeespa.. oriste kati xrisimo.. exe se ena file (px.
    Message 1 of 4 , Nov 7, 2002
    • 0 Attachment

      xmm genikotites :P ayto ginetai kai me .htaccess standar alla den ksero pos :P klasikos windoze user :s

      teeespa.. oriste kati xrisimo.. exe se ena file (px. users.inc.php) ta parakato information..

      <?
      $user[0] = "User1";
      $pass[0] = "pass4user1";

      $user[1] = "User2";
      $pass[1] = "pass4user2";

      $user[2] = "User3";
      $pass[2] = "pass4user3";

      $user[3] = "User4";
      $pass[3] = "pass4user4";
      ?>

      kai fisika pros8eteis osous users 8es me paromoio tropo.. (min ksexaseis fisika na 'anebazeis' to index tou array ka8e metablitis.

      kai meta to kirios script opou 8a kanei thn 'doulia'.. (onomase to login.php)

      <?
      require("users.inc.php");
      $Name = $_POST['Name'];
      $Pwd = $_POST['Pwd'];

      if(isset($Name) AND isset($Pwd))
      {
        include("mods.inc.php");
        if (isset($Name) and isset($Pwd))
        {
          $lim = count($user)-1;
          for ($x = 0; $x <= $lim; $x++)
          {
            if(isset($user[$x]) AND isset($pass[$x]))
            {
              if($Name == $user[$x] AND $Pwd == $pass[$x])
              {
                header("Location: dir/$Name");
              }
            }
            else
            {
              print("Nope... wrong login information<br>\n");
            }
          }
        }
      }
      ?>

      elpizo na voi8isa.. apla sigourepsou oti exeis mia forma me 2 pedia Name kai Pwd h opoia ginetai submit me POST method sto login.php kai fysika na allakseis to directory s'ayto pou 8es na ginetai h metabasi..

      Nikos

       Panayotis Vryonis <vrypan@...> wrote:

      H selida pou kanei to verification 8a einai kapws etsi

      <?
      if my_auth_function($username,$pass) {
          Header("Location: /directory/$user") ;
      } else {
          echo "Username and Pass do no match"
      }
      ?>

      Prosoxh, mias kai stelneis http headers, na mhn exeis kanei kanena echo prin
      to header() kai na mhn exeis kai kanena xarakthra prin to prwto <?
      (einai to idio san na exeis kanei echo.

      Panayotis.

      Evelthon Prodromou wrote:

      >Geia sas kai apo mena meta apo poli kairo!
      >
      >Xreiazomai kati pou na kanei tin eksis leitourgia..
      >arxika skedtika gia to .htaccess alla eipa na rwtisw
      >gia alles idees..
      >
      >vasika.. ena surfer se site na kanei authenticate mesw
      >enos link.. kai analoga me to pios user einai na
      >pigenei sto diko tou directory..
      >
      >kati san /directory/username/
      >
      >opoiadipote voitheia euprosdekti :)
      >
      >__________________________________________________
      >Do you Yahoo!?
      >HotJobs - Search new jobs daily now
      >http://hotjobs.yahoo.com/
      >
      >-
      >��� �� ����������� ��� �� �����, ������� ��� email ���:
      >To unsubscribe from this group, send an email to:
      >
      >php_greek-unsubscribe@yahoogroups.com
      >
      >
      >
      >Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
      >

      >




      -
      ��� �� ����������� ��� �� �����, ������� ��� email ���:
      To unsubscribe from this group, send an email to:

      php_greek-unsubscribe@yahoogroups.com



      Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



      Do you Yahoo!?
      U2 on LAUNCH - Exclusive medley & videos from Greatest Hits CD

    • Evelthon Prodromou
      ok paides.. thanks gia ta reply.. tha ta dokimasw kai ta leme :)) ... __________________________________________________ Do you Yahoo!? U2 on LAUNCH -
      Message 2 of 4 , Nov 9, 2002
      • 0 Attachment
        ok paides.. thanks gia ta reply.. tha ta dokimasw kai
        ta leme :))
        --- Gonik <g0n1k@...> wrote:
        >
        > xmm genikotites :P ayto ginetai kai me .htaccess
        > standar alla den ksero pos :P klasikos windoze user
        > :s
        > teeespa.. oriste kati xrisimo.. exe se ena file (px.
        > users.inc.php) ta parakato information..
        > <?
        > $user[0] = "User1";
        > $pass[0] = "pass4user1";
        >
        > $user[1] = "User2";
        > $pass[1] = "pass4user2";
        >
        > $user[2] = "User3";
        > $pass[2] = "pass4user3";
        >
        > $user[3] = "User4";
        > $pass[3] = "pass4user4";
        > ?>
        >
        > kai fisika pros8eteis osous users 8es me paromoio
        > tropo.. (min ksexaseis fisika na 'anebazeis' to
        > index tou array ka8e metablitis.
        >
        > kai meta to kirios script opou 8a kanei thn
        > 'doulia'.. (onomase to login.php)
        >
        > <?
        > require("users.inc.php");
        > $Name = $_POST['Name'];
        > $Pwd = $_POST['Pwd'];
        >
        > if(isset($Name) AND isset($Pwd))
        > {
        > include("mods.inc.php");
        > if (isset($Name) and isset($Pwd))
        > {
        > $lim = count($user)-1;
        > for ($x = 0; $x <= $lim; $x++)
        > {
        > if(isset($user[$x]) AND isset($pass[$x]))
        > {
        > if($Name == $user[$x] AND $Pwd == $pass[$x])
        > {
        > header("Location: dir/$Name");
        > }
        > }
        > else
        > {
        > print("Nope... wrong login
        > information<br>\n");
        > }
        > }
        > }
        > }
        > ?>
        >
        > elpizo na voi8isa.. apla sigourepsou oti exeis mia
        > forma me 2 pedia Name kai Pwd h opoia ginetai submit
        > me POST method sto login.php kai fysika na allakseis
        > to directory s'ayto pou 8es na ginetai h metabasi..
        >
        > Nikos
        >
        > Panayotis Vryonis <vrypan@...> wrote: H
        > selida pou kanei to verification 8a einai kapws etsi
        >
        > <?
        > if my_auth_function($username,$pass) {
        > Header("Location: /directory/$user") ;
        > } else {
        > echo "Username and Pass do no match"
        > }
        > ?>
        >
        > Prosoxh, mias kai stelneis http headers, na mhn
        > exeis kanei kanena echo prin
        > to header() kai na mhn exeis kai kanena xarakthra
        > prin to prwto <?
        > (einai to idio san na exeis kanei echo.
        >
        > Panayotis.
        >
        > Evelthon Prodromou wrote:
        >
        > >Geia sas kai apo mena meta apo poli kairo!
        > >
        > >Xreiazomai kati pou na kanei tin eksis leitourgia..
        > >arxika skedtika gia to .htaccess alla eipa na
        > rwtisw
        > >gia alles idees..
        > >
        > >vasika.. ena surfer se site na kanei authenticate
        > mesw
        > >enos link.. kai analoga me to pios user einai na
        > >pigenei sto diko tou directory..
        > >
        > >kati san /directory/username/
        > >
        > >opoiadipote voitheia euprosdekti :)
        > >
        > >__________________________________________________
        > >Do you Yahoo!?
        > >HotJobs - Search new jobs daily now
        > >http://hotjobs.yahoo.com/
        > >
        > >-
        > >��� �� ����������� ��� �� �����, ������� ��� email
        > ���:
        > >To unsubscribe from this group, send an email to:
        > >
        > >php_greek-unsubscribe@yahoogroups.com
        > >
        > >
        > >
        > >Your use of Yahoo! Groups is subject to
        > http://docs.yahoo.com/info/terms/
        > >
        > >
        > >
        >
        >
        >
        >
        > -
        > ��� �� ����������� ��� �� �����, ������� ��� email
        > ���:
        > To unsubscribe from this group, send an email to:
        >
        > php_greek-unsubscribe@yahoogroups.com
        >
        >
        >
        > Your use of Yahoo! Groups is subject to the Yahoo!
        > Terms of Service.
        >
        >
        >
        > ---------------------------------
        > Do you Yahoo!?
        > U2 on LAUNCH - Exclusive medley & videos from
        > Greatest Hits CD


        __________________________________________________
        Do you Yahoo!?
        U2 on LAUNCH - Exclusive greatest hits videos
        http://launch.yahoo.com/u2
      Your message has been successfully submitted and would be delivered to recipients shortly.