473,385 Members | 2,029 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

GET / POST conflict in a multi-page form.

Hi,

Wonder if anyone can help with this problem:

I am using an app with several pages, using a session to track vars
between the pages, and using an image map to re-direct back and
forwards between the pages.

The way I redirect is when the image map is clicked on, it posts to a
page called 'control.php' which passes the POST vars to the
corresponding SESSION variables, then redirects to another page, based
upon the co-ords of where the image map was clicked upon.

I have added text links at the bottom of the page:

i.e.

<--- previous page

----> next page

but because the image map POSTs the data to 'control.php', I can't
really add a GET query string to the link at the bottom of the page,
because nothing will be POSTed.

....But then again, I can't add a POST link to the HREF, because it
won't pass the co-ords, and I can't add a special variable to identify
the link to the control form -i.e. control.php?link=3 (as I could with
a GET) and re-direct accordingly.

So, after hours of thinking about this, I'm stumped.

The only idea I have is to hack the image map up into smaller pieces,
add ALT tags to each one, and make do with it - or add NEXT and
PREVIOUS submit images at the bottom of the page too.

If I make do one with large image map, it is no use to someone who is
visually impaired and relies on ALT wordings.

Is there any possible way to achieve what I am trying to do ?

Any ideas ?

Thanks
Neil.
Jul 16 '05 #1
3 3961
Hi sentinel!

On 29 Jul 2003 01:48:03 -0700, ne**@sentinel.f9.co.uk (sentinel)
wrote:
Hi,

Wonder if anyone can help with this problem:

I am using an app with several pages, using a session to track vars
between the pages, and using an image map to re-direct back and
forwards between the pages.

The way I redirect is when the image map is clicked on, it posts to a
page called 'control.php' which passes the POST vars to the
corresponding SESSION variables, then redirects to another page, based
upon the co-ords of where the image map was clicked upon.

I have added text links at the bottom of the page:

i.e.

<--- previous page

----> next page

but because the image map POSTs the data to 'control.php', I can't
really add a GET query string to the link at the bottom of the page,
because nothing will be POSTed.

...But then again, I can't add a POST link to the HREF, because it
won't pass the co-ords, and I can't add a special variable to identify
the link to the control form -i.e. control.php?link=3 (as I could with
a GET) and re-direct accordingly.

So, after hours of thinking about this, I'm stumped.

The only idea I have is to hack the image map up into smaller pieces,
add ALT tags to each one, and make do with it - or add NEXT and
PREVIOUS submit images at the bottom of the page too.

If I make do one with large image map, it is no use to someone who is
visually impaired and relies on ALT wordings.

Is there any possible way to achieve what I am trying to do ?

I understand the following: ou use the coordinates of a picture submit
button to do something. I think that is different to an imagemap,
which is a set of GET links.

Bottomline is, that if you want to submit a form, you have to put form
buttons everywhere, you cannot submit it with GET links (JS aside).
Use Pictures for your next/previous links.

HTH, Jochen
--
Jochen Daum - CANS Ltd.
PHP DB Edit Toolkit -- PHP scripts for building
database editing interfaces.
http://sourceforge.net/projects/phpdbedittk/
Jul 16 '05 #2
Hi,

I don't think I explained my problem as well as I could have.

I can use a GIF file as an image map on a multi-page form, and the
form on each page calls a script called 'control.php', which deals
with a lot of session stuff, then at the bottom is the following code:

if ($submit1[0] >=0 && $submit1[0] <=97) {header ('Location:
index.php');}
if ($submit1[0] >=98 && $submit1[0] <=280) {header ('Location:
current.php');}
if ($submit1[0] >=281 && $submit1[0] <=375) {header ('Location:
income.php');}
if ($submit1[0] >=376 && $submit1[0] <=638) {header ('Location:
desired.php');}
if ($submit1[0] >=639) {header ('Location: generate.php');}

This nicely re-directs to the appropriate page, and the user does not
have to see or know about the file control.php

However, this is only one GIF, so I can only use one ALT tag at a
time, whereas the GIF is made to look like five buttons.

I tried adding a text HREF link at the bottom of the page to re-direct
to the previous and next pages, but this by-passes control.php, so had
to be got rid of.

Because this was a problem, I have tried to chop the GIF up into five
smaller GIFs, or include a GIF submit button as a link at the bottom.

However, this means that I have to include new code in control.php
such as:

if ($submit2[0] >=0....
if ($submit3[0] >=0....

Now, this creates another problem, as PHP looks at the first 'submit',
decides it is greater than 0, and usually re-directs me back to the
first page, without ever getting to $submit2

I need to figure out a way for PHP to recognise several submit buttons
on one page, tell the control script which one has been clicked (or
pass the co-ords) then re-direct to the appropriate page.

Rgds
Neil.

Jochen Daum <jo*********@cans.co.nz> wrote in message news:<62********************************@4ax.com>. ..
Hi sentinel!

On 29 Jul 2003 01:48:03 -0700, ne**@sentinel.f9.co.uk (sentinel)
wrote:
Hi,

Wonder if anyone can help with this problem:

I am using an app with several pages, using a session to track vars
between the pages, and using an image map to re-direct back and
forwards between the pages.

The way I redirect is when the image map is clicked on, it posts to a
page called 'control.php' which passes the POST vars to the
corresponding SESSION variables, then redirects to another page, based
upon the co-ords of where the image map was clicked upon.

I have added text links at the bottom of the page:

i.e.

<--- previous page

----> next page

but because the image map POSTs the data to 'control.php', I can't
really add a GET query string to the link at the bottom of the page,
because nothing will be POSTed.

...But then again, I can't add a POST link to the HREF, because it
won't pass the co-ords, and I can't add a special variable to identify
the link to the control form -i.e. control.php?link=3 (as I could with
a GET) and re-direct accordingly.

So, after hours of thinking about this, I'm stumped.

The only idea I have is to hack the image map up into smaller pieces,
add ALT tags to each one, and make do with it - or add NEXT and
PREVIOUS submit images at the bottom of the page too.

If I make do one with large image map, it is no use to someone who is
visually impaired and relies on ALT wordings.

Is there any possible way to achieve what I am trying to do ?

I understand the following: ou use the coordinates of a picture submit
button to do something. I think that is different to an imagemap,
which is a set of GET links.

Bottomline is, that if you want to submit a form, you have to put form
buttons everywhere, you cannot submit it with GET links (JS aside).
Use Pictures for your next/previous links.

HTH, Jochen

Jul 16 '05 #3

"sentinel" <ne**@sentinel.f9.co.uk> wrote in message
news:f1**************************@posting.google.c om...
Hi,

However, this is only one GIF, so I can only use one ALT tag at a
time, whereas the GIF is made to look like five buttons.


Incorrect.

This is more HTML than PHP, here goes.

You can have different alt-texts for different parts of the image map:

<img src="image.gif" alt="alt text for the whole image" width="200"
height="200" border="0" usemap="#Map">

<map name="Map">
<area shape="rect" coords="16,24,41,45" href="#" alt="alt text for image
area 1">
<area shape="rect" coords="83,14,112,44" href="#" alt="another alt text,
image area 2">
</map>

HTH

--
Suni
Jul 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Web Developer | last post by:
Hi, Question: Why is there an inherent conflict between uncompromising efficiency and portability in C++? Regards WD
2
by: news.dd.chalmers.se | last post by:
Hi I use a library called system-c i a project that likes to be compiled single-threaded and I would like to add shared memory capability. I found some nice code that works fine but only if...
16
by: Shelly | last post by:
(posted previously on comp.lang.php but no response received. Cross-posted in the dreamweaver forum) I am confused about what goes on with method POST. Here is an overview of a my code,...
0
by: VHR | last post by:
Hi, I apologize for posting this a second time, but no one replied from the other group where I posted it. I have a design master and 4 replicas that I have successfully synced on about 4-5...
0
by: vb | last post by:
Hi, Sorry, I am new to C#, so this can be a very simple question. I am using some of DevExpress components in my application.My References in the Solution(for DevExpress) are: DevExpress.Data;...
14
lotus18
by: lotus18 | last post by:
Hello World I have a problem in detecting the conflict schedule (Day and Time). Day 1. M 2. T 3. W 4. TH 5. F
14
lotus18
by: lotus18 | last post by:
Hello all I have these records on my Day Table for my complete database table please click here 1. M 2. T 3. W 4. TH 5. F 6. S
0
by: Bob Alston | last post by:
I have suddenly gotten several replication conflicts where in the winning conflict box, the following is shown: "This row contains data that violates a table or fields level validation rule that...
0
by: egbert | last post by:
Yes, I know that this is off-topic, but I feel justified by sqlite3 being a builtin. The default ON CONFLICT algorithm in SQLite is ABORT. The SQLite documentation ("ON CONFLICT clause") says...
0
by: =?ISO-8859-1?Q?Gerhard_H=E4ring?= | last post by:
egbert wrote: No, it's just like every other database error - the command fails but the connection is left untouched. Sure, the successful ones ;-) FWIW, this restriction is not any...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.