I'm trying to make a codeigniter form, but when I press the button nothing happen. I've already checked everything a thousand time but nothing happen.
Here is the form code:
$this->load->helper('form'); $this->load->helper('captcha'); $attributs = array('class' => 'col-md-12 col-xs-12', 'id' => 'inscription'); echo form_open('utilisateur/ajouter', $attributs); echo "Nom <br>".form_input('nom','test')."<br>"; echo "Prénom <br>".form_input('prenom','test')."<br>"; echo "Age <br>".form_input('age','test')."<br>"; echo "Pseudo <br>".form_input('pseudo','test')."<br>"; echo "Email <br>".form_input('email','test')."<br>"; echo "Mot de passe <br>".form_password('mdp','test')."<br>"; echo "Confirmation <br>".form_password('mdpConf','test')."<br>"; $bouton = array( 'name' => 'button', 'class' => 'button', 'content' => 'Valider !' ); echo "<br>".form_button($bouton); echo form_close(); And the controller called code:
class Utilisateur extends CI_Controller { protected $Pseudo; protected $Email; protected $Nom; protected $Prenom; protected $Age; protected $DateInscription; public function __construct() { parent::__construct(); $this->Pseudo=$Pseudo; $this->Email=$Email; $this->Nom=$Nom; $this->Prenom=$Prenom; $this->Age=$Age; $this->DateInscription=$DateInscription; } public function ajouter() { redirect('pages/view/accueil/', 'location'); } }
type => "submit"