php - redirect after sign up -


i have made script after sign have error, not redirect me index page

here code insertuser.php

include("/pages/classes.php"); $user = new user(); if( isset($_post['username']) && isset($_post['usermail']) && isset($_post['userpassword'])){ $user->setusername($_post['username']); $user->setusermail($_post['usermail']); $user->setuserpassword(sha1($_post['userpassword'])); $user->insertuser(); header("location: ../index.php?success=1"); } 

here public function

public function insertuser(){     include "conn.php";      $req=$bdd->prepare("insert users(username,usermail,userpassword) values (:username,:usermail,:userpassword)");     $req->execute(array(     'username'=>$this->getusername(),     'usermail'=>$this->getusermail(),     'userpassword'=>$this->getuserpassword()         )); } 

and link sign is

http://demo.legacy-cms.xyz/work/ dosent return me success=1

    public function insertuser(){         include "conn.php";     extrect($_post);         $req=$bdd->prepare("insert users(username,usermail,userpassword) values (:username,:usermail,:userpassword)");         $req->execute(array(         'username'=>$this->getusername(),         'usermail'=>$this->getusermail(),         'userpassword'=>$this->getuserpassword()           ));      } . 

Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -