UnitedForums - UK Web Hosting Forum UnitedHosting Community Hosting Forums
Network and Server StatusCustomer SupportUK Web Hosting
UnitedHostingUnitedHosting Sitemap UK Hosting ForumUK Web HostingWeb Hosting ForumsUK Reseller HostingWeb Host CommunityUK Managed Dedicated ServersHosting Help and SupportUK Domain Name Registration

Go Back   UnitedForums.co.uk > UnitedHosting Community > Website Development & Scripting

Reply
 
Thread Tools Rate Thread Display Modes
Old 31st July 2003, 08:29 AM   #1 (permalink)
spells
Senior Member
 
Join Date: Mar 2003
Posts: 142
PHP Help

I have a URL Paremeter like this

http://localhost/fullsize.php?tid=1
http://localhost/fullsize.php?tid=2

The value tid can go up unlimited, somehow I need to control this so it goes up one at a time but set a stop point i.e 4 as it starts dependant on the click for previous page.

I can make it go up by one with the following.

<a href="fullsize.php?tid=<?php echo $row_Recordset1['tid']+1; ?>

But how do I stop it where I want.
spells is offline   Reply With Quote
Old 31st July 2003, 06:59 PM   #2 (permalink)
piper
Senior Member
 
Join Date: Feb 2003
Posts: 587
You need some kind of control structure within you PHP block. e.g.

Code:
<a href="fullsize.php?tid=<?php 

	if ($row_Recordset1['tid'] >= 4)
	{
		// Increment no more
		echo "4";
	}
	else
	{
		// Not yet reached the max limit so increment
		echo $row_Recordset1['tid']+1;
	}
	?>">Click here</a>
piper is offline   Reply With Quote
Old 1st August 2003, 09:27 AM   #3 (permalink)
spells
Senior Member
 
Join Date: Mar 2003
Posts: 142
Thanks for the reply piper much appreciated. There is only one floor with this, the TID number will not always start on 1 it could start on any number. Any ideas on how to get around that.
spells is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


All times are GMT. The time now is 07:44 PM.

UK Web Hosting  |  UK Reseller Hosting  |  UK Dedicated Servers UnitedHosting  |  UnitedSupport  |  UnitedForums  |  SEO by vBSEO 3.0.0
Copyright © 1998-2008 United Communications Limited. All Rights Reserved. Registered in England and Wales 3651923 - VAT Reg No. 737662309