phpJSvForm
v11.11.12
Des classes PHP, des JavaScripts pour créer facilement un formulaire.
|
00001 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 00002 <html xmlns="http://www.w3.org/1999/xhtml"> 00003 <head> 00004 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 00005 <title>Test Formulaire - Exemple basique</title> 00006 <script type="text/javascript" src="form/init.js"></script> 00007 <script type="text/javascript" src="form/jsVerifForm.js"></script> 00008 <link rel="stylesheet" type="text/css" href="form/cssVerifForm.css" /> 00009 </head> 00010 <body> 00011 <?php 00028 require_once('../form/clVerifForm.php'); 00029 00030 $form1 = new Form(); 00031 $text1 = new Input('text1','Nom (*) : '); 00032 $text2 = new Input('text2','Prénom : '); 00034 $form1->addElement('Ce formulaire ne vérifie que l\'existence du champ <i>Nom</i>...', $text1, $text2) ; 00035 $form1->addVerif('exist',$text1) ; 00036 00037 if($form1->verifForm()) 00038 { 00039 echo '<p>Traitement possible... Tout est ok...</p>' ; 00040 echo '<pre>' ; 00041 print_r($_POST) ; 00042 echo '</pre>' ; 00043 } 00044 else 00045 echo $form1; 00046 ?> 00047 </body> 00048 </html>