Jump to content

Is this the correct way to add to a variable?


HughbertD

Recommended Posts

Make sure you are grabbing the existing value for the URL variable startrow, ge:

$startrow = $_GET['startrow'];

 

Otherwise the startrow variable wont increment.

// grab current startrow value
$startrow = $_GET['startrow'];

// display link and increment startrow by 10
echo '<a href="'.$_SERVER['PHP_SELF'].'?startrow='.($startrow+10).'">Next</a>';

Archived

This topic is now archived and is closed to further replies.

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