THe following code increments my count variable in the url. But I can't get the conditional to work when the count reaches the record limit.
What am I missing?
if ($HTTP_GET_VARS['count'] == $totalRows_Record_count) {
echo"<META HTTP-EQUIV=\"refresh\" CONTENT=\"0; URL=lastpage.php\">";
}
else {
++$HTTP_GET_VARS['count'];
echo"<META HTTP-EQUIV=\"refresh\" CONTENT=\"0; URL=$HTTP_SERVER_VARS[PHP_SELF]?count=$HTTP_GET_VARS[count]\">";
}
Thanks for any help. You all have been invaluable.
ROn
Help with if statement, when url var reaches record count.
Moderator: General Moderators
works for me
have you tried printing out .... to see if it contains anyting each time ?
have you tried printing out .... to see if it contains anyting each time ?
Code: Select all
print $totalRows_Record_count;yes, my total records are printed out everytime
My $totalRows_Record_count is printed out along with current record in the format
# of # 9 (i.e. 5 of 24)
But when the record reaches 24 it keeps going pas to 25 of 24 and beyond.
Am I missing some brackets, parenthesis, etc...
# of # 9 (i.e. 5 of 24)
But when the record reaches 24 it keeps going pas to 25 of 24 and beyond.
Am I missing some brackets, parenthesis, etc...
- gyardleydn
- Forum Commoner
- Posts: 27
- Joined: Tue Dec 03, 2002 8:27 am
Re: Help with if statement, when url var reaches record coun
Try starting by hard typing $HTTP_GET_VARS['count'] and $totalRows_Record_count prior to your if statement. . If this successfully changes the branching you could backtrack using string gettype ( mixed var)3dron wrote:THe following code increments my count variable in the url. But I can't get the conditional to work when the count reaches the record limit
Code: Select all
$totalRows_Record_count = (integer) $totalRows_Record_count;
$HTTP_GET_VARSї'count'] = (integer) $HTTP_GET_VARSї'count'];