Hi,
Can somebody tell me where is the error in the below code (in the highlighted text).
I am trying to display option value using a sql query. If the value from the option list is same as brought in value ($VQdesc) then I want to display that value.
Showing the following error:
Parse error: syntax error, unexpected 'if' (T_IF) in your code
------------------------- code ------------------
<?php
$Vqry1 = "select DXCC_CC_QRY_DESC from T_DXCC_QUERY ORDER BY DXCC_CC_QRY_NO";
$VQdesc = oci_parse($cconnect, $Vqry1);
oci_define_by_name($VQdesc, 'DXCC_CC_QRY_DESC', $VCdesc);
oci_execute($VQdesc);
while(oci_fetch($VQdesc)) {
[highlight #FCE94F] echo "<option value='".$VCdesc."' ".if($dxcc_log_qry == '".$VCdesc."') {."selected='selected'".}." >$VCdesc</option>";[/highlight]
}
?>
--------------------------------
TIA
Raj
Can somebody tell me where is the error in the below code (in the highlighted text).
I am trying to display option value using a sql query. If the value from the option list is same as brought in value ($VQdesc) then I want to display that value.
Showing the following error:
Parse error: syntax error, unexpected 'if' (T_IF) in your code
------------------------- code ------------------
<?php
$Vqry1 = "select DXCC_CC_QRY_DESC from T_DXCC_QUERY ORDER BY DXCC_CC_QRY_NO";
$VQdesc = oci_parse($cconnect, $Vqry1);
oci_define_by_name($VQdesc, 'DXCC_CC_QRY_DESC', $VCdesc);
oci_execute($VQdesc);
while(oci_fetch($VQdesc)) {
[highlight #FCE94F] echo "<option value='".$VCdesc."' ".if($dxcc_log_qry == '".$VCdesc."') {."selected='selected'".}." >$VCdesc</option>";[/highlight]
}
?>
--------------------------------
TIA
Raj