Function php argument -


something wrong in 1 of functions. others work fine. application has mvc structure. beginning objects , mvc, must ay. basically, have page (services.php) linking to:

echo"<a href=\"index.php?page=detailservices&id=".$data['id']." \">plus      d'informations...</a>"; 

function in model page (model.php):

function get_nextserv($id) { global $bdd; $id = (int)$id; $req = $bdd->query('select * entreprises id= ?'); $req->execute(array($id)); return $req; } 

and detailservices.php page:

try { if (isset($_get['id'])) {     $id = intval($_get['id']);     $billet = get_nextserv($id);       if (get_nextserv($id) < 1)     {         echo "no......";     } else     {         foreach ($billet $data)         {             echo "<h2>" . $data['entreprise'] . "</h2>";         }         ..... 

i have following errors: warning: missing argument 1 get_nextserv(), called in projects\myapp-v3\controllers\controllers.php on line 27 , defined in projects\myapp-v3\model\model.php on line 54

notice: undefined variable: id in projects\myapp-v3\model\model.php on line 57

fatal error: call member function execute() on non-object in projects\myapp-v3\model\model.php on line 59

thanks guys!


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

how to prompt save As Box in Excel Interlop c# MVC 4 -

xslt 1.0 - How to access or retrieve mets content of an item from another item? -