I am fairly new to php and Javascript, as well as new to this list. 
 
I have a query to Solr using php, which works fine. I use a form page, with 
<form method= GET and an <input type = submit to activate the query, sending 
the first 10 hits to a table on a separate results page. However, on the 
results page I would like to add a button (type=submit or type=button) that 
would retrieve the next set of 10 records. On the results page, I set the 
$limit variable to 10 and this remains fixed, because I only want 10 records at 
a time.  I set the $offset variable to 0 for the first set of results and try 
to increment it  by 10 for the next set ($offset +=10;). However, as I 
understand html, once the results page is rendered, the $offset variable dies, 
so it cannot be incremented.
 
I've tried making $offset global, but without success. 
I've tried using <input type=button with a JavaScript function to increment 
$offset, but it doesn't seem to remember the previous value.
 
Does anyone have any ideas? Thanks in advance.
_______________________________________________
New York PHP User Group Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

http://www.nyphp.org/show-participation

Reply via email to