CocoPop Posted June 27, 2007 Share Posted June 27, 2007 Hello, I was wondering if it is at all possible to have a simple link (href) and for that link to POST variables, say for example a blog page with 3 clickabvle links to see the last 3, 5 or 10 blog entrys. So if i was going to use the get command i would simple add ?$Entrys=3 to the URL. If there is any way to do this with the POST command you help would be appreciated. Thanks Link to comment https://forums.phpfreaks.com/topic/57397-the-post-array/ Share on other sites More sharing options...
suma237 Posted June 27, 2007 Share Posted June 27, 2007 can you post the code? Link to comment https://forums.phpfreaks.com/topic/57397-the-post-array/#findComment-283933 Share on other sites More sharing options...
CocoPop Posted June 27, 2007 Author Share Posted June 27, 2007 OK so the link url html bit loks like this (using GET) <a class="SideLinks" href="http://www.deadandcolourblind.co.uk?$Limit=10"> Last 10</a> </br> And to output the blog i use while($Limit > 0) { $Entry = mysql_result($Result, $RecordCount, "Blog"); $Title = mysql_result($Result, $RecordCount, "Title"); $Category = mysql_result($Result, $RecordCount, "BlogCatagory"); $Date = mysql_result($Result, $RecordCount, "Date"); //Output The Blog Contents, Default = 3 Entrys echo "<div class='Border'>"; echo "<div class='Blog'> <div class='Date'> $Date Category: $Category </div> <div class='BlogTitle'> <B> $Title </B> <IMG class='Icon' src='Images/Star.png'> </div> <br> <div class='Blog'> $Entry </div> </div> </div>"; $RecordCount --; $Limit --; } Link to comment https://forums.phpfreaks.com/topic/57397-the-post-array/#findComment-283939 Share on other sites More sharing options...
AndyB Posted June 27, 2007 Share Posted June 27, 2007 Couple of points. ?$Limit=10 in your links should actually be Limit=10 (no dollar sign). Also, somewhere in the code to display the output you need to abstract the value of Limit as passed from the previous page via get or post. $Limit does not automatically exist. If you really want to POST values, then you'll need a simple form (method='post') with a dropdown so visitors can select the value of Limit. Link to comment https://forums.phpfreaks.com/topic/57397-the-post-array/#findComment-283967 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.