hi monks, Can any one help me. It's an web based programing with perl/CGI
#!/usr/bin/perl use CGI; use DBI; print "Content-type:text/html\r\n\r\n"; $buffer=$ENV{'QUERY_STRING'}; ($start,$end,$next)=split(/&/,$buffer); if($next > 0){$next1=$next+1;} $dbuser="root"; $dbpass="root"; $dsn="DBI:mysql:backupprocess;host=localhost"; $mysql->disconnect if $mysql; $mysql=DBI->connect($dsn,$dbuser,$dbpass); $sth2=$mysql->prepare("select * from subscribermis"); $sth2->execute(); $rv = $sth2->rows; if($buffer=~/MM/){$sth1=$mysql->prepare("select * from subscribermis l +imit $start,$end");} else{$start=0;$end=2;$sth1=$mysql->prepare("select * from subscribermi +s limit $start,$end");} $sth1->execute(); print "<body ><center><table border=1><tr bgcolor='#35b5fe'><td align= +center ><font color='#ffffff' size='2'>Date</ font></td><td align=center ><font color='#ffffff' size='2'>Count</font +></td> <td align=center><font color='#ffffff' size='2'>utl</font></td><td ali +gn=center><font color='#ffffff' size='2'>celtel</font></td> </tr>"; while(@arr=$sth1->fetchrow_array()) { print "<tr><td align=center><font class='snewheads'>".$arr[$i]."</font +></td> <td align=center><font class='snewheads'>".$arr[$i+1]."</font></td> <td align=center><font class='snewheads'>".$arr[$i+2]."</font></td> <td align=center><font class='snewheads'>".$arr[$i+3]."</font></td></t +r>"; } print"</table><br><br><br>"; $ss=$rv/2; $i = 0; $j = 0; for($j=1;$j<=($ss);$j++){ $i=$i+2; $end=$i; $end1=2; $start=$end-2; print "<a href=mm1.pl?$start&$end1&MM>$j</a>";
OUT PUT:
Date Count utl celtel 1 364922200 1 1 2 74902999 1 1 1234567
This out put shows without previous and next but i need it with both previous and next option like in google if number of pages is more than 5. but expected out put
Date Count utl celtel 1 364922200 1 1 2 74902999 1 1 <<12345>>

In reply to page by page problem by sanku

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.