Hello everyone, recently studying PHP and have a serious problem. Here is my case – I have a database in which I have ID, Fullname, and County and Online. As I pressed the button “Next” to transfer to the next member in alphabetical order. But I can not do so in LIMIT can not increase the value of LIMIT by one.
Or do you have any other ideas?
[B]PHP
[code=php]
// Get Info
$result = mysql_query(“SELECT * FROM users WHERE id=’$id'”);
$row = mysql_fetch_array($result);
$id = $_GET[‘id’];
// Get next link to user by fullname
$queryup = mysql_query(“select * from users order by fullname LIMIT “. $idup. ” ,1″);
$rowidup = mysql_fetch_array($queryup);
$nxt = $rowidup[‘id’];
echo $nxt;
[B]HTML
[code=html]<form method=”post” action=”” onSubmit=”window.location.reload()”>
<table border=”1″ width=”100%”>
<tr>
<td>Full name</td>
<td><input type=”text” name=”fullname” value=”<?php echo $row[‘fullname’]; ?>” /></td>
</tr>
<tr>
<td>E-mail</td>
<td><input type=”text” name=”email” value=”<?php echo $row[’email’]; ?>” /></td>
</tr>
<tr>
<td>Country</td>
<td>
<?php echo “$row[‘country’]; ?>
</td>
</tr>
<tr>
<td>Online</td>
<td>
<?php
if ($row[‘onlinecheck’] == ‘1’) {
echo “<input type=’checkbox’ name=’onlinecheck’ checked value=’0′ />”;
} else {
echo “<input type=’checkbox’ name=’onlinecheck’ value=’1′ />”;
}
?>
</td>
</tr>
</table>
<input type=”submit” name=”submit” class=”navbtn” value=”Save” />
<?php echo “<a href=’index.php?id=$nxt’ class=’navbtn’>Next »</a>”; ?>
</form>