954,591 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

I need help with a parse error!

spacer.gifspacer.gifspacer.gifspacer.gifspacer.gifspacer.gifspacer.gifspacer.gifspacer.gifspacer.gifspacer.gifspacer.gifspacer.gifspacer.gifspacer.gifspacer.gifspacer.gifspacer.gifspacer.gifspacer.gifspacer.gifspacer.gifspacer.gifspacer.gifspacer.gifspacer.gifspacer.gifspacer.gifindex_r1_c1.gifindex_r1_c20.gif index_r1_c22.gif index_r1_c25.gif spacer.gifindex_r2_c1.gif Meet With Singles
meetwithsingles.com spacer.gifindex_r3_c1.gifspacer.gifindex_r4_c1.gif index_r4_c3.gif index_r4_c6.gif index_r4_c9.gif index_r4_c12.gif index_r4_c16.gif index_r4_c19.gif index_r4_c23.gif index_r4_c27.gif spacer.gif



<?echo $nume_users?>*

<?echo $password_text?>*

<?echo $password_text?>*

<?echo $email_text?>*

<?echo $email_text?>*

<?echo $sex_text?>

<?
for ($i=0;$i<?echo $sex_array[$i]?>
<?
}
else
{
?>
<?echo $sex_array[$i]?>
<?

}
}
?>

<?echo $sexuality_text?>

<?
for ($i=0;$i<?echo $sexuality_array[$i]?>
<?
}
else
{
?>
<?echo $sexuality_array[$i]?>
<?

}
}
?>

<?echo $personal_ad_text?>

<?echo $location_text?>

<?echo $country_text?>

<?
for ($i=0;$i<?echo $country_array[$i]?>
<?
}
else
{
?>
<?echo $country_array[$i]?>
<?

}
}
?>

<?echo $age_text?>*

<?
for ($i=0;$i<?echo $age_array[$i]?>
<?
}
else
{
?>
<?echo $age_array[$i]?>
<?

}
}
?>

<?echo $birth_date_text?>

<?
for ($i=0;$i<?echo $zile_array[$i]?>
<?
}
else
{
?>
<?echo $zile_array[$i]?>
<?
}
}
?>

<?
for ($i=0;$i<?echo $luna_array[$i]?>
<?
}
else
{
?>
<?echo $luna_array[$i]?>
<?
}
}
?>

<?
for ($i=0;$i<?echo $anul_array[$i]?>
<?
}
else
{
?>
<?echo $anul_array[$i]?>
<?
}
}
?>

<?echo $zodia_text?>

<?
for ($i=0;$i<?echo $zodia_array[$i]?>
<?
}
else
{
?>
<?echo $zodia_array[$i]?>
<?
}
}
?>

<?echo $marital_status_text?>

<?
for ($i=0;$i<?echo $marital_status_array[$i]?>
<?
}
else
{
?>
<?echo $marital_status_array[$i]?>
<?
}
}
?>

<?echo $icq_text?>

<?echo $msn_text?>l

<?echo $web_text?>

<?echo $eyes_colour_text?>

<?
for ($i=0;$i<?echo $eyes_colour_array[$i]?>
<?
}
else
{
?>
<?echo $eyes_colour_array[$i]?>
<?

}
}
?>

<?echo $hair_colour_text?>

<?
for ($i=0;$i<?echo $hair_colour_array[$i]?>
<?
}
else
{
?>
<?echo $hair_colour_array[$i]?>
<?

}
}
?>

<?echo $weight_text?>

<?
for ($i=0;$i<?echo $weight_array[$i]?>
<?
}
else
{
?>
<?echo $weight_array[$i]?>
<?

}
}
?>

<?echo $height_text?>

<?
for ($i=0;$i<?echo $height_array[$i]?>
<?
}
else
{
?>
<?echo $height_array[$i]?>
<?

}
}
?>

<?echo $music_text?>

<?
for ($i=0;$i<?echo $music_array[$i]?>
<?
}
else
{
?>
<?echo $music_array[$i]?>
<?

}
}
?>

<?echo $partner_text?>

<?echo $question_text?>



<?=$terms_text?>
* See Terms Here

<?=$newsletter_text?>



-


spacer.gifspacer.gifspacer.gifspacer.gifspacer.gifspacer.gifspacer.gifspacer.gifspacer.gifspacer.gifspacer.gifspacer.gifspacer.gifindex_r18_c1.gifspacer.gifindex_r19_c1.gifspacer.gifindex_r20_c1.gifspacer.gifindex_r21_c1.gifspacer.gifindex_r22_c4.gifindex_r22_c7.gifindex_r22_c8.gifindex_r22_c10.gifindex_r22_c13.gifindex_r22_c15.gifindex_r22_c17.gifindex_r22_c24.gif Meet With Singles Copyright 2003 All Rights Reserved. spacer.gifspacer.gif

jcates23
Newbie Poster
2 posts since Jun 2004
Reputation Points: 10
Solved Threads: 0
 

Try pasting line 93 with ten lines of code before and after. Don't paste the entire thing, it's too time consuming to scan through. It seems there's an error involving a semicolon, but you'll have to post the code, just like I said.

Also, use the PHP tags for this forum. It'll make it clearer.

samaru
a.k.a inscissor
Team Colleague
1,256 posts since Feb 2002
Reputation Points: 262
Solved Threads: 18
 

Here is shortened version:

}
function user_check($nume)
{
if (gaseste_user_by_nick($nume)==0)
{
return TRUE;
echo "same user";
}
else
{
return FALSE;
}


}
function terms_check($terms)
{
if (isset($terms)&&$terms==1) --------> line 93
{
return TRUE;
}
else
{
return FALSE;
echo "termeni";
}

}
if (isset($Submit))
{
if (password_check($password,$password1) && nume_check($username) &&email_check($email,$email1) && user_check($username)&& terms_check($terms))
{
if (empty($personal_ad))
{
$personal_ad="";
}
if (empty($location))
{
$location="";
}
if (empty($age))
{
$age=0;
}

thanks again!

jcates23
Newbie Poster
2 posts since Jun 2004
Reputation Points: 10
Solved Threads: 0
 

jcates23,

I know what your bug is. You are using the HTML entity for ampersand instead of "&", the correct notation :sad: . PHP does not convert HTML entities to ordinal characters before parsing. Your line 93 should read:

[PHP]
if (isset($terms) && $terms == 1)
[/PHP]

Note: I usually separate terms with parenthesis before boolean math:

[PHP]
if ((isset($terms)) && ($terms == 1))
[/PHP]

You'll notice that you've used the & HTML entity in several places. If you don't change them all, another parse error will occur later on.l

Toba
Junior Poster
192 posts since Jun 2004
Reputation Points: 115
Solved Threads: 5
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You