Send URL with variables by PHP

0

I'm trying to send 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 the 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 track the link, how can I send the link to the variables?

    
asked by anonymous 02.12.2014 / 13:31

1 answer

3

Try this:

<select id="selectAdults" name="selectAdults">

<select id="childs" name="childs">

If it does not work, you can always change the $_REQUEST['dpd1'] to $_GET['dpd1'] or $_POST['dpd1']

    
02.12.2014 / 13:46