Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 06-21-2005, 12:51 AM Error ! T_BOOLEAN_OR
Uche's Avatar
Extreme Talker

Posts: 174
Location: Nigeria/Lagos
Trades: 0
Hello guys i know someone here might have come accross the error ! can someone pls tell me what i should cos i'm having that errror code :- Parse error: parse error, unexpected T_BOOLEAN_OR in /home/uchealon/public_html/searchprofile/registeruser.php on line

right from here down.--> other scripts are working perfectly but from this code here to the last.. got some error

PHP Code:
if(!$Firstname) || (!$Lastname) || (!$Gender) || (!$Maritalstatus) || 

(!
$Title) || (!$Address) || (!$City) || (!$Country) || (!$Phone) || 

(!
$Email) || (!$Matriculation) || (!$Faculty) || (!$Degree) || (!$Graduation

|| (!
$Profession) || (!$Pastor){
echo 
'All information are required by you.<br/>';

if(!
$Firstname){
echo 
" Firstname is a required filled. please do fill it out";
}
if(!
$Lastname){
echo 
" lastname is a required filled. please do fill it out";
}
if(!
$Gender){
echo 
" Gender is a required filled. please do fill it out";
}
if(!
$Maritalstatus){
echo 
" Maritalstatus is a required filled. please do fill it out";
}
if(!
$Title){
echo 
" Title is a required filled. please do fill it out";
}
if(!
$Address){
echo 
" Address is a required filled. please do fill it out";
}
if(!
$City){
echo 
" City is a required filled. please do fill it out";
}
if(!
$Country){
echo 
" Country is a required filled. please do fill it out";
}
if(!
$Phone){
echo 
" Phone is a required filled. please do fill it out";
}
if(!
$Email){
echo 
" Email is a required filled. please do fill it out";
}
if(!
$Matriculation){
echo 
" Matriculation is a required filled. please do fill it out";
}
if(!
$Faculty){
echo 
" Faculty is a required filled. please do fill it out";
}
if(!
$Degree){
echo 
" Degree is a required filled. please do fill it out";
}
if(!
$Graduation){
echo 
" Graduation is a required filled. please do fill it out";
}
if(!
$Degree){
echo 
" Degree is a required filled. please do fill it out";
}
if(!
$Profession){
echo 
" Profession is a required filled. please do fill it out";
}
if(!
$Pastor){
echo 
" Pastor is a required filled. please do fill it out";
}
include 
'index.html'
exit(); 


// let dump the information to the database.

$query = ("INSERT INTO searcprofile VALUES('$Firstname','$Lastname','$Gender,'$Marital','$status','$Title','$Address','$City','$Country','$Phone','$Email','$Matriculation','$Faculty','$Degree','$Graduat','$Profession','$Pastor')");
mysql_query($query);
mysql_close();

header("location: index.html");
}
else
{
echo 
"we have problem creating you account please try again.";
include 
'register.html';
exit();
?> 
__________________
Life is just lyke a school where everybody goes to learn one or two thing. the more u school, the more u learn more about school..The more we live our lifes.. the more we learn more about life.

Please login or register to view this content. Registration is FREE

Last edited by Uche; 06-21-2005 at 12:55 AM..
Uche is offline
Reply With Quote
View Public Profile Visit Uche's homepage!
 
 
Register now for full access!
Old 06-21-2005, 07:16 AM
Kyrnt's Avatar
The Post-Mod Years

Posts: 2,536
Location: Western Maryland
Trades: 0
You most likely are doing a check similar to if( !$somevar ) that doesn't like being checked in such a way. Unless you are specifically checking a boolean, I would suggest not using an if statement in such a manner. Consider using the isset() or empty() methods to check whether a variable contains a value.
__________________
—Kyrnt
Kyrnt is offline
Reply With Quote
View Public Profile Visit Kyrnt's homepage!
 
Old 06-21-2005, 09:58 AM
Uche's Avatar
Extreme Talker

Posts: 174
Location: Nigeria/Lagos
Trades: 0
oh okay thnks i'm gonna try using empty
__________________
Life is just lyke a school where everybody goes to learn one or two thing. the more u school, the more u learn more about school..The more we live our lifes.. the more we learn more about life.

Please login or register to view this content. Registration is FREE
Uche is offline
Reply With Quote
View Public Profile Visit Uche's homepage!
 
Old 06-21-2005, 10:19 AM
Christopher's Avatar
Iced Cap

Latest Blog Post:
Cross-domain AJAX with JSONP
Posts: 3,110
Location: Toronto, Ontario
Trades: 0
The first line:
Code:
if(!$Firstname)
You are closing the if by placing the parenthesis after $Firstname. I think what you want is to place !$Firstname in it's own set of parenthesis:
Code:
if( (!$Firstname)
And at the end of your conditions, you are missing the closing parenthsis:
Code:
|| (!$Profession) || (!$Pastor) {
Should be
Code:
|| (!$Profession) || (!$Pastor) ) {
Note that all these parenthsis aren't needed since the NOT operator takes precedence over the OR operator. I think it looks better without them (not that it really matters though):
Code:
if( !$Firstname || !$Lastname || !$Gender || !$Maritalstatus ||
    !$Title || !$Address || !$City || !$Country || !$Phone ||
    !$Email || !$Matriculation || !$Faculty || !$Degree || !$Graduation ||
    !$Profession || !$Pastor ) {
__________________

Please login or register to view this content. Registration is FREE
- Latest Articles:
Please login or register to view this content. Registration is FREE
,
Please login or register to view this content. Registration is FREE

--
Please login or register to view this content. Registration is FREE

Christopher is offline
Reply With Quote
View Public Profile
 
Old 06-21-2005, 10:30 AM
Uche's Avatar
Extreme Talker

Posts: 174
Location: Nigeria/Lagos
Trades: 0
Thanks let me try this will paste in result wen i'm done
__________________
Life is just lyke a school where everybody goes to learn one or two thing. the more u school, the more u learn more about school..The more we live our lifes.. the more we learn more about life.

Please login or register to view this content. Registration is FREE
Uche is offline
Reply With Quote
View Public Profile Visit Uche's homepage!
 
Reply     « Reply to Error ! T_BOOLEAN_OR
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.21202 seconds with 12 queries