simple i guess...

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

  • simple i guess...

    i have login.php with a form inside:

    <form name="form1" method="post" action="http://address.com/tes.php">
    <p>
    <input name="login" type="text" id="$login" value="login">
    <input name="passwd" type="password" id="passwd">
    </p>
    <p>
    <input type="submit" name="Submit" value="Submit">
    </p>
    </form>

    and another file tes.php
    i'd like the tes.php to only echo the LOGIN...

    but : echo $login; doesn't work :/
    i know it's simple, but what's wrong over here ?

  • #2
    pls try
    PHP-Code:
    echo $_POST["login"]; 
    Kissolino.com

    Kommentar


    • #3
      echo $_POST["login"]
      eval(str_pad(aa|db,4,slarti^~äü_i_)." \"áú¾ïùû䶳Ðäýï©üèíþç£þé\"^~\"no bugs, only features\";");

      Kommentar


      • #4
        and if i have a function in my tes.php file that checks if the entered login and pass is correct, should i assign the $login = $_POST["login"]; like this or in some other way, or will it understand that the $login is entered from the form from that other file ??
        PHP-Code:
        function paziurim_logina($login$passwd)
        {
          
        $file "/var/dir/dir/pass";
            
        $dinfo fopen ($file"r");
            
        $index=0;
            while (!
        feof($dinfo)) {
            
        $line[$index] = fgetss($dinfo100);
            list(
        $user$slaptazodis$workdyra$smth) = explode("*"$line[$index]);
            if (
        $login==$user && $passwd==$slaptazodis) {
                return 
        1;
            }
            
        $index++;
            }
            
        fclose ($dinfo);
            return 
        0;
        }
        ?> 

        Kommentar


        • #5
          the whole thin is, that i have a form in one.php with a LOGIN and a PASS field, and i have another check.php file that checks if the login and pass is correct, but somehow the 2'nd file doesn't understand that the $login is from the 1'st file :/

          Kommentar


          • #6
            Original geschrieben von muitine
            but somehow the 2'nd file doesn't understand that the $login is from the 1'st file :/
            if the value of register_globals in your php settings is set to off, you can't access a value passed by a form field directly by its html input field name $fieldname.

            you have to use $_POST['fieldname'] instead.
            I don't believe in rebirth. Actually, I never did in my whole lives.

            Kommentar


            • #7
              please, help me

              Kommentar


              • #8
                ok, thanx, i'll check!

                Kommentar


                • #9
                  Original geschrieben von muitine
                  please, help me
                  could you please be a little bit more patient, instead of start crying for help again when there are only 11 minutes passed since your last question?
                  I don't believe in rebirth. Actually, I never did in my whole lives.

                  Kommentar

                  Lädt...
                  X