If a form submits back to same page do you need to use $get

Posted on 16th Feb 2014 by admin

IM trying to pass page number and year that was selected back to the same page.

i have this code Code: echo '<form action="archivedBookings.php" method="get">';
echo '<select name="year" class="dropdown" onChange="this.form.submit()" >';
Which submits the form when the user selects a year from the drop down box and

Code: <option value="<?=$this_page.'&$year'?>" <? if($_GET{'year'}){echo 'selected';}?>><?=$year?></option>
the code above, should send through the page variable and the year variable that was selected.
The selected part i dont know what that does and when the page submits i get a crazy url
that looks like this

Code: http://www.dhcottages.co.uk/testsite/admin/archivedBookings.php?year=http%3A%2F%2Fwww.dhcottages.co.uk%2Ftestsite%2Fadmin%2Fbookings%2FarchivedBookings.php%26%24year
Can anyone point me in the right direction a tall?

Other forums