I am trying to add some php to my form html code so that if you have already registered you don't have a drop down option.
The code I want is
But whenever I save the form the echo line goes to
Which, usurprisingly throws up a parse error😟
What is 'cleaning up' the \ and how do I stop it please?? :?
The code I want is
<?php
$db =& JFactory::getDBO();
$query = "
SELECT `cf_id`
FROM `#__chronoforms_data_meets`
WHERE `cf_user_id` = ".$user->id." and `meet_name` = 'Lakes Christmas Meet Dec 2011' ;
";
$db->setQuery($query);
$d = $db->loadResult();
if ( $d ) {
echo "<option value=\"Self\" selected>Self</option>";
}
?>
But whenever I save the form the echo line goes to
echo "<option value="Self" selected>Self</option>";
Which, usurprisingly throws up a parse error😟
What is 'cleaning up' the \ and how do I stop it please?? :?
Hi olaeblue,
Please try
Bob
Please try
echo '<option value="Self" selected>Self</option>';
Bob
This topic is locked and no more replies can be posted.