Posting Request Data
Question: I am trying to post requests with Python to register an account.

It is not creating the account.

Any help would be great!

It has to accept the user's email and password and confirmation of their
password.

    
    
    import requests
    
    with requests.Session() as c:
        url="http://icebithosting.com/register.php"
        EMAIL="charliep1551@gmail.com"
        PASSWORD = "test"
        c.get(url)
        login_data= dict(username=EMAIL,password=PASSWORD,confirm=PASSWORD)
        c.post(url, data=login_data,)
        page=c.get("http://icebithosting.com/")
        print (page.content)
    


Answer: Your form file names are incorrect, they should be:

    
    
    email:'foo@bar.com'
    password:'bar'
    confirm_password:'bar' # confirm_password
    

Which you can see if you monitor the request in chrome tools:

[![enter image description
here](http://i.stack.imgur.com/ISTEe.png)](http://i.stack.imgur.com/ISTEe.png)

