0
I am trying to submit a URL that has variables that will be treated on another site.
I have the code:
<form action="OUTROSITE.COM/default.aspx?q=1136&lang=pt-PT&CheckIn=<?php echo $_REQUEST['dpd1'];?>&CheckOut=<?php $_REQUEST['dpd2'];?>&ad=<?php echo $_REQUEST['electAdults'];?>" method="POST" target="_blank">
And HTML like this:
<input type="text" value="" id="dpd1" readonly placeholder="Check-in"/>
<input type="text" value="" id="dpd2" readonly placeholder="Check-out" />
<select id="selectAdults">
<option selected><?php echo $lang['BE_ADULTO']; ?></option>
<option value="1" >1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
</select>
<select id="childs">
<option selected><?php echo $lang['BE_CRIANCA']; ?></option>
<option value="1">0</option>
<option value="2">1</option>
<option value="3">2</option>
<option value="4">3</option>
<option value="4">4</option>
</select>
<input type="text" placeholder="<?php echo $lang['BE_COD_PROMOCIONAL']; ?>"/>
<input type="submit" value="Enviar">
When I submit, the open link is:
OUTROSITE.COM/default.aspx?q=1136&lang=pt-PT&CheckIn=&CheckOut=&ad=&sid
Variables do not follow the link, how can I send the link with variables?
Forgot a
echo
in$_REQUEST['dpd2']
.– Thomas
Hello @Thomas fixed, but still does not work, URL will empty
– Thallyson Dias
If
dpd1
anddpd2
sanereadonly
and start without value, as the values of these variables arrive in the$_REQUEST
?– Thomas
is a datepicker from Foundation http://foundation-datepicker.peterbeno.com/example.html, I have readonly the user cannot change.
– Thallyson Dias
Have you tried removing the
readonly
?– Thomas