www.webdeveloper.com
Results 1 to 2 of 2

Thread: hi friends please help me out for this problem.....

  1. #1
    Join Date
    Nov 2012
    Posts
    20

    hi friends please help me out for this problem.....

    i am struggling with one problem i.e if current task will going to true how to redirect from one page another page. actually i tried with "header" but it is not taking me into another page please find my mistake and let me inform the solution.....

    here is my code

    $dbhost='localhost';
    $dbuser='root';
    $dbpass='';
    $conn=mysql_connect($dbhost,$dbuser,$dbpass);
    if(isset($_POST["insert"]))
    {
    $uname=$_POST["uname"];
    $eid=$_POST["eid"];
    $phno=$_POST["phno"];
    $pass=$_POST["psw"];
    $pass1=md5($pass);
    $quli=$_POST["quli"];
    $years=$_POST["years"];
    $mnth=$_POST["months"];
    $indu=$_POST["indu"];
    $lookingfor=$_POST["lookingfor"];
    $sql="SELECT username FROM registration WHERE username='$uname'";
    mysql_select_db('goget');
    $retval=mysql_query($sql,$conn);
    $r=mysql_fetch_array($retval);
    if($r[0] == $uname)
    {
    require("home.php");
    }
    else
    {
    $e="insert into registration(username,emailid,phnumber,password,qualification,years,months,industry,looking_for) values('$uname','$eid','$phno','$pass1','$quli','$years','$mnth','$indu','$lookingfor')";
    $f=mysql_query($e,$conn);
    header("Location: http://http://localhost/goget/date/reg.php");
    exit;
    }
    mysql_close($conn);
    }

  2. #2
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    18,923
    Looks like a malformed URL to me:
    PHP Code:
    header("Location: http://http://localhost/goget/date/reg.php"); 
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles