the code :
Code: Select all
$database2 = new database( "localhost", "xx", "xx", "xx", "");
$query = "UPDATE userprofile"
. "\n SET fullname = " . $database->Quote($row->name)
. "\n, email = " . $database->Quote($row->email)
. "\n, password = " . $database->Quote($row->password)
. "\n, deviceBrand = " . $database->Quote($_POST['deviceBrand'])
. "\n, deviceModel = " . $database->Quote($_POST['deviceModel'])
. "\n, mobileNumber = " . $database->Quote($_POST['mobileNumber'])
. "\n, icNo = " . $database->Quote($_POST['icNo'])
. "\n, dob = " . $database->Quote($_POST['dob'])
if ( $_POST['ethnicity']=="Others" )
{
. "\n, ethnicity = " . $database->Quote($_POST['other_ethnic'])
}
else {
. "\n, ethnicity = " . $database->Quote($_POST['ethnicity'])
}
if ( $_POST['religion']=="Others" );
{
. "\n, religion = " . $database->Quote($_POST['other_religion'])
} else {
. "\n, religion = " . $database->Quote($_POST['religion'])
}
. "\n, country = " . $database->Quote($_POST['country'])
. "\n, state = " . $database->Quote($_POST['state'])
. "\n, address = " . $database->Quote($_POST['address'])
. "\n, city = " . $database->Quote($_POST['city'])
. "\n, postcode = " . $database->Quote($_POST['postcode'])
. "\n, interest = " . $database->Quote($_POST['interest'])
. "\n WHERE userID = " . $database->Quote( $orig_username );
$database2->setQuery( $query );
$database2->query();
print ("query >> $query <br>");
and this is line 209
Code: Select all
if ( $_POST['ethnicity']=="Others" )
{
. "\n, ethnicity = " . $database->Quote($_POST['other_ethnic'])
}
else {
. "\n, ethnicity = " . $database->Quote($_POST['ethnicity'])
}
if ( $_POST['religion']=="Others" );
{
. "\n, religion = " . $database->Quote($_POST['other_religion'])
} else {
. "\n, religion = " . $database->Quote($_POST['religion'])
}
im newbie in joomla n php..plis help me..