I am trying to fill out a web form from within a script I am writing. I think that I should be using curl to do this, but I'm not really sure. The form has username and password fields and a submit button. I want to be able to log in from the command line.
Html from the site:
<h5 align="center"><font color="#000000"><div align="center">
<table class = "singleTable" width="400" height="275" id="table1">
<tr>
<td>
<form action="https://safeconnect.bucknell.edu:8443/authenticate.!^" name="loginForm" method="post" onsubmit="return validateForm(this)" >
<table width="100%" id="table2">
<tr>
<td colspan="2">�</td>
</tr>
<tr>
<td>
<p align="right"><label for="username">Network Username:</label></td>
<td>
<input type="text" name="userId" id=" " tabindex="1" accesskey="u" value="" size="16" /></td>
</tr>
<tr>
<td>
<p align="right">Password:</td>
<td>
<input type="password" name="pass" id="password" tabindex="2" accesskey="p" value="" size="16" /></td>
</tr>
<tr>
</tr>
<tr>
<td colspan="2">
<p align="center">
<div style="display: none;" id="autherror">
<h5 align="center"><font color="#000000">Please enter valid credentials</font></h5>
</div>
<p align="center">
<input type="submit" tabindex="3" accesskey="l" value="Submit" /></td>
</tr>
</table>
</form>
</td>
</tr>
</table>
</div></font></h5>
</div>
Any help would be greatly appreciated.