To obtain as many records as you like, use LIMIT.
Example:
SELECT * FROM tbl LIMIT 5,10; # Retrieve rows 6-15
Modified working code:
<?php
$host='localhost';
$user='root';
$password='root';
$database='database';
$startindex=(isset($_REQUEST['seek']) ? $_REQUEST['seek'] : 0);
$db=mysql_connect($host, $user, $password)
or die ("Impossibile connettersi al server $host");
mysql_select_db($database, $db)
or die ("Impossibile connettersi al database $database");
$queryCnt = "SELECT count(*) as cnt FROM ordini_master";
$CntRow=mysql_fetch_row(mysql_query($query, $db));
$CntData = $CntRow[0];
$step = 10;
$query="SELECT * FROM ordini_master LIMIT $startindex, $step";
$result=mysql_query($query, $db);
while ($row = mysql_fetch_assoc($result)) {
foreach($row as $k=>$v) {
$myfield=mysql_fetch_field($result, $k);
print($myfield->name . " : $v <br/>");
}
}
mysql_free_result($result);
mysql_close($db);
print("<br/>Seleziona il record<br/>");
for($index=0; $index<$CntData; $index=$index+$step) {
print("<a href=\"{$_SERVER['PHP_SELF']}?seek=$index\" >" .
($index+1) . "</a> ");
}
Utilize Tadman's data as well. The MySQL extension will no longer be maintained, so it's crucial to take action to prevent SQL injection and to utilize PDO or the mysqli extension.
I hope this helps you.