Reputation: 21
I want to submit a html form with curl on this site. http://pickupline.be/bekijk
When you click on "Stem", it sends a post form to http://pickupline.be/submitVote.
The form requires this fields:
<input type="text" id="num" name="num" class="required center_text">
<input type="text" id="firstname" name="fname" class="fname required" >
<input type="text" id="lastname" name="lname" class="lname required" >
<input type="text" id="mail" name="email" class="required email" >
<select name="birthday_day" class="required birthday_day">
<option selected value="">DD</option>
<option value="1">1</option>
<select name="birthday_month" class="required birthday_month">
<option selected value="">MM</option>
<option value="1">1</option>
<select name="birthday_year" class="required birthday_year">
<option selected value="">JJ</option>
<option value="2000">2000</option>
<input type="checkbox" id="chkOpdehoogte" name="newsletter"><label for="chkOpdehoogte">Ik wil op de hoogte blijven van nieuwe inzendingen</label>
<input type="checkbox" id="chkAgreeConditions" name="agree" class="required"><label for="chkAgreeConditions">Ik ga akkoord met het <a href="http://pickupline.be/reglement" target="_blank">reglement</a></label>
<input type="hidden" id="pickupline_id" name="id">
<input type="submit" value="STEM">
Please notice, the id is hidden. This is what I've tried so far:
curl -v --data 'num=${nummer}&fname=${voornaam}&lname=${achternaam}&email=${mail}&birthday_day=${dag}&birthday_month=${maand}&birthday_year=${jaar}&agree="yes"&id=100' http://pickupline.be/submitVote --referer http://pickupline.be/bekijk
But I don't get a response from the server. I've also tried to save the cookies and use them with curl, no difference.
Upvotes: 2
Views: 2914
Reputation: 58034
Hidden is just a property for the browser to not show the field to the user. It is still sent the same way as any other form field in the actual HTTP POST request.
Upvotes: 2