with out submit button click form submit

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ctsasikumar
    New Member
    • Nov 2006
    • 17

    #1

    with out submit button click form submit

    Hai freinds

    With out submit button how to submit this form in php sever side.using post method

    i have set the value.get method menas no probs.pass the value usl....

    Using post method how is possible.



    <?php

    $postdata = http_build_quer y(
    array(
    'username' => 'user',
    'password' => 'user123',

    )
    );

    $opts = array('http' =>
    array(
    'method' => 'POST',
    'header' => 'Content-type: application/x-www-form-urlencoded',
    'content' => $postdata
    )
    );

    $context = stream_context_ create($opts);

    $result = file_get_conten ts('http://www.domainname. com/login.php', true, $context);
    ?>
  • TheMadMidget
    New Member
    • Oct 2006
    • 98

    #2
    If you just want to send the data over and not follow it like a form would do, use cURL. Here is a recent post about it.
    Last edited by TheMadMidget; Nov 27 '06, 01:54 PM. Reason: Typographical Error

    Comment

    • ctsasikumar
      New Member
      • Nov 2006
      • 17

      #3
      Originally posted by TheMadMidget
      If you just want to send the data over and not follow it like a form would do, use cURL. Here is a recent post about it.
      Hai MadMidget

      thank for ur replay.....

      the value is coming.how to go next page...just my think is simeple.i will run one progarm.it's automtically login and show mail inbox.it's possible in perl using

      mechanize; module
      $ie->set_fields(
      Email =>'testuser',
      Passwd=>'test'
      );
      $ie->click();

      the same equal function i needed...

      Comment

      Working...