Click here to Skip to main content
16,011,608 members
Home / Discussions / Web Development
   

Web Development

 
QuestionClient Based : Activex / Simple Object - ATL [modified] Pin
rund1me25-Nov-06 8:31
rund1me25-Nov-06 8:31 
Questionapache and mod_rewrite Pin
Sam 20064-Nov-06 13:10
Sam 20064-Nov-06 13:10 
AnswerRe: apache and mod_rewrite Pin
Bradml4-Nov-06 23:39
Bradml4-Nov-06 23:39 
AnswerRe: apache and mod_rewrite Pin
alex.barylski5-Nov-06 7:28
alex.barylski5-Nov-06 7:28 
QuestionMobile Browser Web Development - Graphic Image Type & Size Pin
JSadleir4-Nov-06 12:36
JSadleir4-Nov-06 12:36 
QuestionTreeView Javascript help [modified] Pin
Rohit Saralaya3-Nov-06 20:11
Rohit Saralaya3-Nov-06 20:11 
QuestionHow to create paging Pin
kumar bharat bhusanam3-Nov-06 20:08
kumar bharat bhusanam3-Nov-06 20:08 
AnswerRe: How to create paging Pin
Bradml4-Nov-06 23:57
Bradml4-Nov-06 23:57 
I assume you mean like a certain amount of results per page.

This is a simple task. I'll give a simple PHP example.

<br />
//First let's find the first result and the last result to show.<br />
$first_res = $_REQUEST['first'];<br />
$last_res = $_REQUEST['last'];<br />
<br />
//Now if null set defaults<br />
if($first_res == null or $last_res == null){<br />
//Defaults are 0-20<br />
$first_res = '0';<br />
$last_res = '20';<br />
}<br />
<br />
$isvalid = validation_function_here($first_res, $last_res);<br />
<br />
//Now check if input is valid<br />
if ($isvalid !== true){<br />
//Invalid input<br />
die('Invalid Format, Please Press back button and choose a different option');<br />
}else{<br />
<br />
//Get data from database.<br />
<br />
//Connect<br />
$con = mysql_connect('localhost', 'root', 'password') or die('Could not connect to database.');<br />
//Select Database.<br />
mysql_select_db('data') or die('Could not select database');<br />
<br />
//Use select query with the LIMIT param<br />
$result = mysql_query('SELECT * FROM table LIMIT '. $first_res .', '. $last_res .';');<br />
}<br />
<br />
//Now simply use your normal display function<br />
<br />
<br />


and that's that.

Note:
You then need to set functions that get the result number etc. and return then next set to be displayed based on the difference between the two, and echo that into the href of a link on the page. and exampl of this link would be:

[a href="?first=21&last=41"]Next[/a]

Hope that helped.






QuestionWhat is this Remember me Pin
kumar bharat bhusanam3-Nov-06 20:06
kumar bharat bhusanam3-Nov-06 20:06 
AnswerRe: What is this Remember me Pin
Bradml5-Nov-06 0:16
Bradml5-Nov-06 0:16 
GeneralRe: What is this Remember me Pin
UltraCoder5-Nov-06 15:40
UltraCoder5-Nov-06 15:40 
GeneralRe: What is this Remember me Pin
Bradml5-Nov-06 20:40
Bradml5-Nov-06 20:40 
QuestionHow to send message through bluetooth devices Pin
kumar bharat bhusanam3-Nov-06 19:08
kumar bharat bhusanam3-Nov-06 19:08 
AnswerRe: How to send message through bluetooth devices Pin
Bradml4-Nov-06 23:36
Bradml4-Nov-06 23:36 
QuestionRe: How to send message through bluetooth devices Pin
kumar bharat bhusanam5-Nov-06 21:47
kumar bharat bhusanam5-Nov-06 21:47 
QuestionSuggestions for a layout algorithm anyone? Pin
RichardGrimmer2-Nov-06 22:42
RichardGrimmer2-Nov-06 22:42 
GeneralRe: Suggestions for a layout algorithm anyone? Pin
Akhilesh Yadav3-Nov-06 0:01
Akhilesh Yadav3-Nov-06 0:01 
GeneralRe: Suggestions for a layout algorithm anyone? Pin
RichardGrimmer3-Nov-06 0:21
RichardGrimmer3-Nov-06 0:21 
QuestionHow to Disable Pop Up Blocker through Code ??? Pin
jagmit202-Nov-06 18:29
jagmit202-Nov-06 18:29 
AnswerRe: How to Disable Pop Up Blocker through Code ??? Pin
Paddy Boyd2-Nov-06 23:56
Paddy Boyd2-Nov-06 23:56 
JokeRe: How to Disable Pop Up Blocker through Code ??? Pin
Bradml3-Nov-06 0:10
Bradml3-Nov-06 0:10 
JokeRe: How to Disable Pop Up Blocker through Code ??? Pin
Guffa3-Nov-06 1:33
Guffa3-Nov-06 1:33 
QuestionASP and AJAX Pin
popin2-Nov-06 8:35
popin2-Nov-06 8:35 
AnswerRe: ASP and AJAX Pin
UltraCoder2-Nov-06 9:24
UltraCoder2-Nov-06 9:24 
GeneralRe: ASP and AJAX Pin
popin3-Nov-06 7:45
popin3-Nov-06 7:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.