Page 1 of 1

how carry variable to 2 different pages with one click?

Posted: Sun Dec 31, 2006 8:49 am
by paul_20k
Hi

I have lots of links on my home page. When I click on that links, it carries the variable value to another page by passing variable by url like

Code: Select all

<a target="Content" STYLE="text-decoration:none" href="xyz.php?act1=PPP"><font face='Verdana' size='3' color=#FFFFFF><small>PPP</small></font></a>
I want to pass this variable value "PPP" to another page at the same time also ie with only one click like if I have another page called "abc.php", I want to use that variable value "PPP" on page "xyz.php"(as shown in my code) and "abc.php" at the same time.

Thanks

Posted: Sun Dec 31, 2006 8:51 am
by feyd
Why not use a session variable to pass the data around?

Posted: Sun Dec 31, 2006 9:06 am
by paul_20k
hi

I tried with sessions but I want to attach the particular variable value to that particular link , like if I have link

Code: Select all


<a target="Content" STYLE="text-decoration:none" href="xyz.php?act1=PPP"><font face='Verdana' size='3' color=#FFFFFF><small>PPP</small></font></a>

<a target="Content" STYLE="text-decoration:none" href="xyz.php?act2=QQQ"><font face='Verdana' size='3' color=#FFFFFF><small>QQQ</small></font></a>

and so on. I have like 25 such links. I can carry these variable values to page "xyz.php" and its working fine. I just want to carry these same values(like variables act1, act2, .......etc) in the same style to another page like "abc.php".

Thanks

Posted: Sun Dec 31, 2006 9:24 am
by feyd
Attach the variable again to those links?

Posted: Sun Dec 31, 2006 9:29 am
by paul_20k
feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


hi

   you mean like 

[syntax="html"]<a target="Content" STYLE="text-decoration:none" href="xyz.php?act1=PPP", "abc.php?act1=PPP"><><font face='Verdana' size='3' color=#FFFFFF><small>PPP</small></font></a>
thanks


feyd | Please use[/syntax]

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]

Posted: Sun Dec 31, 2006 9:36 am
by feyd
The browser cannot request two pages for the same page. The latter request will often be used. Although your posted syntax won't even attempt to request two pages.

Posted: Sun Dec 31, 2006 9:49 am
by paul_20k
hi
The latter request will often be used.
which later request is often used? The one which I sent in my last message? but its not working at all. If I can't request 2 pages , then how can I get the variable value on the other page ie abc.php with one click??

Thanks

Posted: Sun Dec 31, 2006 9:59 am
by feyd
Latter, as in the last request made by the user of the browser. If one clicks a link then clicks a different link before the page has changed the second link will more often then not be take priority to follow by the browser.

Your site design may need some revision if you need two pages requested with a single click. For example, one page could incorporate the other via include().

Posted: Sun Dec 31, 2006 10:15 am
by paul_20k
thanks