Jump to content

Passing infromation from page to page


phil321

Recommended Posts

Hi there...

I want to design a page which has over 700 links on it, all of which link to a php file. Each link needs to pass 3 fields of information which always stays the same for each of those links. I originally thought of making each link a submit button in its own HTML form with 3 invisible fields set to their required static values. But these invisible fields still take up space on the web page even though they cant be seen, which ruins the webpage layout.

There must be a better way of figuring this out (or at least thats what Im hoping)! Can you help?

Thanks for your time!
Link to comment
Share on other sites

how are you making them invisable, that they take up space?

if you use:
[code]<input type="hidden" name="fieldName" value="fieldValue">[/code]

it will be invisable, take up no space, and the value will be passed as $_POST['fieldName']; on your server response.

or why not just pass the variables in the URL.

[code]<a href="http://www.mySite.com/filename.php?var1=blahblahblah&var2=value2&var3=whatever">my link</a>[/code]

these will be passed as $_GET['var1'] $_GET['var2'] etc...
Link to comment
Share on other sites

[quote]I originally thought of making each link a submit button in its own HTML form with 3 invisible fields set to their required static values. But these invisible fields still take up space on the web page even though they cant be seen, which ruins the webpage layout.[/quote]
That statement is not true. They take up space in the source, but are not displayed at all, no space is used on the screen.

Ken
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.