/    Sign up×
Community /Pin to ProfileBookmark

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…..

[B]here is my code[/B]

$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);
}

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@NogDogDec 06.2012 — Looks like a malformed URL to me:
[code=php]
header("Location: http://http://localhost/goget/date/reg.php");
[/code]
×

Success!

Help @ramyasri spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.7,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...