| | |
Next button:Help
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Aug 2008
Posts: 48
Reputation:
Solved Threads: 4
sql Syntax (Toggle Plain Text)
SELECT * FROM emails LIMIT (1, 10)
That would be the SQL query for your first page. Then:
sql Syntax (Toggle Plain Text)
SELECT * FROM emails LIMIT (11,10)
For the second page. Repeat, and you have it
Last edited by peter_budo; Aug 4th, 2008 at 6:48 am. Reason: Keep It Organized - please use [code] tags
hello use this code:
you just pass the $nextid and $previd to your nextpage...
php Syntax (Toggle Plain Text)
$t="select * from `yourtable` "; $i=mysql_query($t); $row=mysql_fetch_array($i); $n="select * from yourtable where id > '".$row['id']."'"; $p=mysql_query($n); $d=mysql_fetch_array($p);//here you will get next message... $nextid=$d['id']; $previd=$row['id'];
you just pass the $nextid and $previd to your nextpage...
Last edited by Shanti Chepuru; Aug 4th, 2008 at 4:03 am.
Be intelligent, But Don't try to cheat.. Be innocent But Don't get cheated..
•
•
Join Date: Aug 2008
Posts: 48
Reputation:
Solved Threads: 4
•
•
•
•
No its not like that, see if the current mail is 2nd and if i click on the next link it should be possible to open the 3rd mail. which ever i open , if i click on the next link. it should be possible to open the next mail corresponding to the opened current mail.
php Syntax (Toggle Plain Text)
// File: viewmail.php?id=2 <?php // security if(!(is_numeric($_GET['id']))) { echo 'Error'; } $id = $_GET['id']; $query = mysql_query("SELECT * FROM emails WHERE id = $id"); while ($rows = mysql_fetch_array($query, MYSQL_ASSOC) { // print out whatever information (subject, author, time, text, etc.) } ?> <a href="viewmail.php?id=<?php echo $id--; ?>">Previous email</a> <a href="viewmail.php?id=<?php echo $id++; ?>">Next email</a>
Last edited by Demiloy; Aug 4th, 2008 at 4:12 am.
![]() |
Similar Threads
- Button to open a new browser window (ASP.NET)
- The name for the Resize Button to ad to Script (HTML and CSS)
- monitor power button not responding (Monitors, Displays and Video Cards)
- how can I change start page & recover the general page button to change (Web Browsers)
- [Tweak] Renaming your Start Button (Windows tips 'n' tweaks)
- Random Restarts (Windows NT / 2000 / XP)
- help please cannot use search button on ie6 (Web Browsers)
Other Threads in the PHP Forum
- Previous Thread: T_constant_encapsed_string?
- Next Thread: Login page by using Sessions
| Thread Tools | Search this Thread |
# 5.2.10 action address apache api array auto autoincrement beginner binary broken cakephp checkbox class classes cms code cron curl database date dehasher destroy display dissertation domain dynamic echo echo$_get[x]changingitintovariable... email error errorlog fatalerror file files folder form forms function functions google href htaccess html if-else image images include insert ip javascript joomla legislation limit link load login mail masterthesis menu mlm multiple mysql mysqlquery oop open paypal pdf persist php popup problem query radio random record recursion remote script search server sessions sms sockets source space sql syntax system table tutorial update upload url validator variable video web youtube






