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()" >';
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 Like 40 Dislike
Previous forums Next forums
Other forums

Custom array sort? asc then desc
Any ideas how I could sort this array? I've been trying for a while. Maybe with usort, but I have no

Need help with unexpected T-STRING error
I'm a newbie and I'm still learning PHP. However this error has me stumped. I've googled, searched t

array ...
hi
Code: function formatCategories($categories, $parentId)
{
// $navCat stores all child

Insert Failing.
Hey,
I am making a Sign up page for a website, but the insert query into the Database does not se

How to know if online site made with PHP
Hello,
I see some sites that does not display extensions at all , for example:

www.site.co

Renaming array keys
The issue: renaming array keys inside a foreach loop.

I'm trying to build a pie chart image w

How to form a xml form table with a single sql statement..?
Hi everyone,
I don't know if this is going to be a duplicate thread but i couldn't

an interesting question
Greetings folks, got to ask an interesting question...

let say
i have created a function s

how to make database item unique
Hey guys,

is it possible to do this:

I have the database item $title being pulled for

Mysterious Timeouts
I've deployed a few simple AJAX-enabled web page to a local server that is accessed through the Inte

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash