Fonctions utiles Développeur Dolibarr: Difference between revisions

Jump to navigation Jump to search
Mise en forme
(Ajout de fonctions utiles essentielles pour débuter la programmation sous Dolibarr)
 
(Mise en forme)
Line 8: Line 8:
Utilisation possible :
Utilisation possible :


Exemple en php :  
Exemple en php : <syntaxhighlight lang="PHP">
 
<nowiki><code></nowiki>
 
$monChamp= $_POST["monChamp"];
$monChamp= $_POST["monChamp"];
 
</syntaxhighlight>devient<syntaxhighlight lang="PHP">
<nowiki></code></nowiki>
$monChamp= GETPOST("monChamp");
 
</syntaxhighlight>Si nous souhaitons être sûr que l'élément passé en paramètre est un entier, nous pouvons préciser :<syntaxhighlight lang="PHP">
devient  
$monChamp= GETPOST("monChamp",'int');
 
</syntaxhighlight>
<nowiki><code></nowiki>
 
$monChamp= GETPOST("monChamp");  
 
<nowiki></code></nowiki>
 
Si nous souhaitons être sûr que l'élément passé en paramètre est un entier, nous pouvons préciser :<nowiki><code></nowiki>
 
$monChamp= $_POST["monChamp",'int'];
 
<nowiki></code></nowiki>
20

edits

Navigation menu