Natecat
Natecat

Reputation: 2172

HTML POST confusion

I am trying to login to a website programmically, and I ran into a strange bit of code, and I can't figure out how I should format my POST request to login. Here is the form

<fieldset>
    <form action="/user/login" class="form" id="login_form" method="post">
        <p><input autocomplete="off" autofocus="" name="user[username]" placeholder="username" type="text" /></p>
        <p><input name="user[password]" placeholder="password" type="password" /></p>
        <div class="has_checkbox"><div id="reme" name="reme" type="checkbox"></div>
        <div class="smallfont">remember me</div></div>
        <p><a href="#" id="forgot_password">Forgot password?</a></p>
        <p class="submit"><input class="red" name="submit" type="submit" value="Login"  /></p>
    </form>
</fieldset>

Upvotes: 0

Views: 45

Answers (2)

C3roe
C3roe

Reputation: 96151

Like what data am I supposed to send

The same your browser would send – which you can easily find out yourself by looking at such a request using your browser’s developer tools.

Upvotes: 1

ptvty
ptvty

Reputation: 5664

The problem may be due to same origin policy. see http://en.wikipedia.org/wiki/Same_origin_policy

Also pay attention to browser malfunctions while doing this. HTML Form POST Cross Domain

Upvotes: 0

Related Questions