Module development: Difference between revisions

Jump to navigation Jump to search
No edit summary
Line 137: Line 137:
''Example :''
''Example :''
<source lang="php">
<source lang="php">
$id=$_GET["id"];
$id=GETPOST('id','int');
$ref=GETPOST('ref','alpha');
 
$product = new Product($db) ;
$product = new Product($db) ;
$result = $product->fetch($id) ; //Test $result to check the database read is ok
$result = $product->fetch($id,$ref) ; // Test $result to check the database read is ok
</source>
</source>


Navigation menu