phil321 Posted July 5, 2006 Share Posted July 5, 2006 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! Quote Link to comment https://forums.phpfreaks.com/topic/13742-passing-infromation-from-page-to-page/ Share on other sites More sharing options...
DaveLinger Posted July 5, 2006 Share Posted July 5, 2006 uh...<?phpecho "<a href=\"link.php?var1=value&var2=value&var3=value\">link</a>?>Then you can use PHP's GET function to use those variables in the target page Quote Link to comment https://forums.phpfreaks.com/topic/13742-passing-infromation-from-page-to-page/#findComment-53380 Share on other sites More sharing options...
micah1701 Posted July 5, 2006 Share Posted July 5, 2006 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... Quote Link to comment https://forums.phpfreaks.com/topic/13742-passing-infromation-from-page-to-page/#findComment-53382 Share on other sites More sharing options...
kenrbnsn Posted July 5, 2006 Share Posted July 5, 2006 [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 Quote Link to comment https://forums.phpfreaks.com/topic/13742-passing-infromation-from-page-to-page/#findComment-53385 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.