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

pop3 and fsockopen
So I am able to connect to the pop3 server, log in, and check how many messages there are. I am hav

How to sum these output values
Hi

I need sum the month totals
SELECT region_name, area_name ,SUM (CASE WHEN S

Uploading Filetypes and placing them in seperate folders.
Hello,

first post , and asking for help im afraid. Very new to PHP, was making good progress

Need help with a mail notify function
I was tasked with setting up a site that's been prewritten. The site is basically a form that captur

image upload, resize THEN submit form
Ok so I have a form that requires the user to upload an image, and then do something with that image

Calender Not Opening
The following code is not loading the javascript calender in another window. It's not doing anything

PEAR Email Attachment w/ $gpg
I have no issues with this code if I take out the attachement section and include the info in the em

Sales orders ans reservations not taken into account on MPS / MRP
Hello,

I am implementing the MPS / MRP and I have the following problem:

I ha

Multiple Do / While Statements?
I'm still very new to PHP, and running in to a problem when trying to execute a do/while loop inside

How to ... (FAQs)
... get e-mail notifications As several people asked how to get e-mail notifications when new posti

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