fork download
  1. <?php
  2.  
  3. $link_start = 'index.php?';
  4. $search = isset($_GET['search']) ? urlencode($_GET['search']) : '' ;
  5. if (isset($_GET['search']))
  6. {
  7.  
  8. $link = array('search' => $search,
  9. 'p' => 'replace');
  10.  
  11. } else {
  12. $link = array('page' => 'list',
  13. 'p' => 'replace');
  14. }
  15.  
  16. $count = $db->getCountInDb(urldecode($search));
  17. $students = $db->searchFromStudents(urldecode($search), $page);
  18. $pageLinker= $link_start . http_build_query($link) . "\n";
Runtime error #stdin #stdout #stderr 0.02s 24448KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
PHP Notice:  Undefined variable: db in /home/xocuxf/prog.php on line 16
PHP Fatal error:  Call to a member function getCountInDb() on null in /home/xocuxf/prog.php on line 16