I'm trying to get my first form to work and I keep getting this error. I've been all over the forums here and else where and while it appears to be a simple formatting error I can't for the life of me find the thing.
The full error message is this;
Parse error: syntax error, unexpected '$', expecting T_VARIABLE in /home8/mycgpimp/public_html/components/com_chronocontact/chronocontact.php(41) : eval()'d code on line 72
Lines 41 and 72 are as follows;
39 $paramsvalues = $registry_cf->toObject( );
40 if($paramsvalues->dbconnection == "Yes"){
41 eval ("?>" .$rows[0]->dbclasses);
42 }
67 function showform($posted)
68 {
69 global $mainframe;
70 $database =& JFactory::getDBO();
71
72 //clear any stored sessions
73 $session =& JFactory::getSession();
74 if(!$posted){
75 $session->set("chrono_verification_msg", '', md5('chrono'));
76 }
I've also checked all my field names to make sure that there aren't any numbers at the start etc. I do have a few with '_' inbetween elements and they're all in uppercase if that's an issue. As I'm not familiar with PHP I'm in the dark here.
any and all help appreciated.
Kind regards
Tim
It's line 72 of the code which is being "eval'd" on line 41 - in this case 41 eval ("?>" .$rows[0]->dbclasses);.
Most likely you have a '-' or another non-standard character in one of your field names??
Bob
I had exact the same problem, and indeed, my field names had underscores in it (e.g. 1_email, 2_age etc. etc.). I've removed the underscores, removed the old tabel, created a new one and problem was solved.
Best wishes
EV
The problem wasn't the underscores but the names beginning with numbers - they must begin with a letter.
Bob
I saw I had also used '2room' instead of 'double room'
Best wishes,
Emile
i have issue in my form
i have created form
<table class="freeconsult" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td><span>Name (required)</span></td>
</tr>
<tr>
<td><input type="text" size="30" class="required" value="" name="yourname"></td>
</tr>
<tr>
<td><span>Your Email (required)</span></td>
</tr>
<tr>
<td><input type="text" size="30" class="required validate-email" value="" name="youremail"></td>
</tr>
<tr>
<td><span>Best time to call</span></td>
</tr>
<tr>
<td><input type="text" size="30" class="validate-number" value="" name="besttime"></td>
</tr>
<tr>
<td><span>Message</span></td>
</tr>
<tr>
<td><textarea rows="5" cols="23" name="message"></textarea></td>
</tr>
<tr>
<td>{imageverification}</td>
</tr>
<tr>
<td><input name="name" type="submit" value="Submit"></td>
</tr>
</table>
but when i am run the form in browser an error
Parse error: parse error, expecting `','' or `';'' in D:\xampp\htdocs\revision\components\com_chronocontact\chronocontact.php(53) : eval()'d code on line 9
Please solve sir
regards,
Uday
Line 41 is loading the database table info. The problem will probably be a dash, space or other special character in the tabel name or one of the column names.
Bob
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /data02/isitcomp/public_html/wintersmarine.co.uk/class.phpmailer.php on line 44
Here's the code:
/**
* Email priority (1 = High, 3 = Normal, 5 = low).
* @var int
*/
public $Priority = 3;(the last line being line 44).Can someone please help! I'm really stuck!
