[Solved] syntax error, unexpected ‘if’ [duplicate]


You’ve got a run-on line, and can fix it like this:

$id = '<input type="text" value="';
if(isset($_REQUEST['rid'])){
    $id .= $_REQUEST['rid'];
}
$id .= '" name="patient" >';
echo $id;

solved syntax error, unexpected ‘if’ [duplicate]