php - Pagination link in codeigniter is not working properly -


Pagination link looks fine

But when I select Link 2 the result is not being displayed and the url is being changed to / kkci / searchresult / users / 1 , instead it Should be changed to / kkci / Searchresult / users / 2 .

When I select the next numerical link data, it is not being received.

I am posting my code below, please go through it and help me.

The thing is that when I click the number 2 of the paging link echo var_dump () shows the result is empty and and I echo $ data-> gt; ; No value is available for email

I am not able to get a reply through Google but the problem of page load occurs when I select the paging link But it is not working.

New to CI, I ask CI friends to help me display the results for endorsements page 2 and 3. In total, I have 3 records which I am showing a record for page.

Controller:

Public function user ($ border = 1, $ offset = 0) {$ this-> Load-> Helper ('url'); $ This- & gt; Load-> Library ('session'); If ($ postdata = $ this- & gt; session- & gt; Flash data ('post_data')) {foreach ($ post = $ value = & gt; $ value) {$ _POST [$ key] = $ value; }} $ This- & gt; Session-> Set_flashdata ('post_data', serialize ($--> Input-> Post ()); $ Data = array (); $ Look = $ this- & gt; Input-> Post ('look'); $ Age = $ this- & gt; Input-> Post ('age'); $ Age_from = $ this- & gt; Input-> Post ('age_from'); $ Age_ to = $ this- & gt; Input-> Post ('age_to'); $ Se_ct = $ this- & gt; Input-> Post ('sect'); $ Subsect = $ this- & gt; Input-> Post ('subsect'); $ Coun_try = $ this- & gt; Input-> Post ('country'); $ Sta_te = $ this- & gt; Input-> Post ('state'); $ Ci_ty = $ this- & gt; Input-> Post ('city'); $ Qualification = $ this- & gt; Input-> Post ('eligibility'); $ Result = $ this- & gt; Search Results- & gt; Login ($ view, $ age, $ age year, $ age, $ se_ct, $ subsect, $ coun_try, $ sta_te, $ ci_ty, $ qualification); // for base_url () $ this- & gt; Load-> Helper ('url'); $ Config = array (); $ Config ['base_url'] = base_url ("searchcustoms/users/"); $ Config ['total_rows'] = Count ($ result); $ Config ['per_page'] = $ border; $ This- & gt; Load-> Library ('pagination', $ config); $ Data ['pagination_links'] = $ this- & gt; Notation on page- & gt; Create_links (); $ Data ['result'] = array_slice ($ result, $ offset, $ border); $ This- & gt; Load-> View ('SearchCalts', $ data); // If my model is below (empty ($ result)) 'echo' result is empty; } Else {foreach ($ $ data as result) {echo $ data-> E-mail. '& Lt; Br / & gt; '; }} Echo $ pagination_links; // is able to display the paging link in my watch page. I}

Model:

  public function login ($ look, $ age, $ Age_to, $ age_from, $ se_ct, $ subsect, $ coun_try, $ sta_te, $ ci_ty, $ merit} {return $ this-> Db- & gt; Query ("Choose from users where gender = '$ form' and position = '1'") - & gt; result (); // Return to Controller}  

See:

  if (empty ($ result)) 'echo' result set is empty '; } Else {echo '& lt; Pre & gt; '; Echo var_dump ($ result); Forex Currency ($ $ as Information $ result) {echo $ data- & gt; E-mail. '& Lt; Br / & gt; '; }} Echo $ pagination_links;  


Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -