If a form submits back to same page do you need to use $get
Posted on
16th Feb 2014 07:03 pm 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()" >';
Did you know?Explore Trending and Topic pages for more stories like this.
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?
No comments posted yet
Your Answer:
Login to answer
197
40
Other forums
tag inside php... hi
Code: <?php echo "<td width="$columnWidth%" align=&Splitting Attributes SQL> SELECT I_NAME, substr(I_NAME,1,instr(I_NAME,'O')) "First part",
substr(I_NAME, IN Which PHP-Editor do you think is the best? Hi everyone, Myself Brian Anderson. For the last 2 years i have been working a records between 2 dates Hello all,
I have a date tracked table which contains effective_start_date and effective Concatenate two strings ??? I have string one $string1 and another $string2.
How to concatenate (add) both of them $str Else statement screws up all css Does anyone know what goes wrong in the process with this php code? This code seems to be causing PHP switch function help Hi, I am trying to create a search function for a directory website. On the search function on html PHP and MySQL on intranet? Is it possible to use both these on an intranet network? Linked Keywords I am trying to get a script that makes my predefined keyword converted to links and / or converted t please help me in this update statment hi every one
if I have table and this data in it
id name
10
|