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
Post a Comment