if(empty($_POST['txtEmail']))
{
if (!mysql_query($sql,$con))
{
die('Error: ' . mysql_error());
}
$page='SignUp.php';
header('Location:'.$page);
}
else
{
$page='SignUp.php?emptyusr=1';
header('Location:'.$page);
}
ElaineTeo
0
Newbie Poster
Recommended Answers
Jump to PostSyntacticaly code is OK. What error do you get? What do you want to achieve?
Jump to Postplease post more detail
Jump to PostI do not understand why you run the query if the field is blank. What is the $sql query? Maybe you should negate the condition (if $_POST['txtEmail'] is not empty then...):
if(!empty($_POST['txtEmail']))
You actually have to tell what to achieve or maybe post the whole script.
All 11 Replies
broj1
356
Humble servant
Featured Poster
jstfsklh211
79
Light Poster
ElaineTeo
0
Newbie Poster
ericnmk80
0
Newbie Poster
ericnmk80
0
Newbie Poster
ElaineTeo
0
Newbie Poster
broj1
356
Humble servant
Featured Poster
ElaineTeo
0
Newbie Poster
broj1
356
Humble servant
Featured Poster
broj1
356
Humble servant
Featured Poster
ElaineTeo
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.