Jump to content

The POST array


CocoPop

Recommended Posts

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
Share on other sites

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
Share on other sites

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
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.