Hi,
I am experimenting with using XMLHTTP and the POST method in VBA to log into a local webserver, but I can't seem to send the right parameters to submit the login details. I have extracted the HTML code for the form element below:
<form name="frmLogin" method="Post" action="login_2.asp?Submit=YY&iatt=">
<input type="text" name="txtUserName">
<input type="password" name="txtUserPass">
<input type="submit" name="LoginSubmit" value="Login" style="Cursor: Hand">
</form>
and the VBA code I am using to logo is below:
Set XMLHttpRequest = New MSXML2.xmlhttp
With XMLHttpRequest
.Open "POST", "login_2.asp?Submit=YY&iatt=", False
.setRequestHeader "Content-Type", "application/x- .send "txUserName=a+username&txtUserPass=somenumber"
End With
When I run the macro, the webserver says that I have not submitted any information.
Can anyone help?
I am experimenting with using XMLHTTP and the POST method in VBA to log into a local webserver, but I can't seem to send the right parameters to submit the login details. I have extracted the HTML code for the form element below:
<form name="frmLogin" method="Post" action="login_2.asp?Submit=YY&iatt=">
<input type="text" name="txtUserName">
<input type="password" name="txtUserPass">
<input type="submit" name="LoginSubmit" value="Login" style="Cursor: Hand">
</form>
and the VBA code I am using to logo is below:
Set XMLHttpRequest = New MSXML2.xmlhttp
With XMLHttpRequest
.Open "POST", "login_2.asp?Submit=YY&iatt=", False
.setRequestHeader "Content-Type", "application/x- .send "txUserName=a+username&txtUserPass=somenumber"
End With
When I run the macro, the webserver says that I have not submitted any information.
Can anyone help?