When I run my fie and open this one folder, I get this error message
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/ezbiz/public_html/ar/templates/a_settings.html on line 61


Any help will be greatly appreciated.

Recommended Answers

All 11 Replies

Why don't you show the code near those lines? You look like having forgotten a ";" at the end of line 60

why would you post 'php code error' in the java forum?

moved

Why don't you show the code near those lines? You look like having forgotten a ";" at the end of line 60

Thanks for the response. Unfortunely I am not a PHP programmer. I have ascritp with this error.

Here is the total file, if you would review it I would appreciate it much.

<script language=javascript>
function validateForm(frm)
{
	var pass=frm.pass.value;
	var repass=frm.repass.value;
	
	if(pass!=repass)
	{
		alert("Password confirmation failed");
		return false;
	}
	
	frm.submit();
}
</script>

<h1 align=center>Future 2019 AD Autoresponder Settings</h1>

<form method=post>
<table align=center style="border:1px solid black;" cellpadding=7> 
<tr><th colspan=2>Administrator login info</th></tr>
<tr><td width=150>Change Password:</td>
<td width=300><input type=password name=pass size=30></td></tr>
<tr><td width=150>Confirm New Password:</td>
<td width=300><input type=password name=repass size=30></td></tr>
<tr><td colspan=2 align=center>
<input type=hidden name=admin value=1>
<input type=button onclick="javascript:validateForm(this.form);" value="Save Admin Info">
</td></tr>
<tr><td colspan=2>&nbsp;</td></tr>
<tr><th colspan=2>General Site Settings</th></tr>
<?php
if($register)
{
	?>
	<tr><td>Double opt-in:</td>
	<td><select name=optin>
	<option value=1 <?if(get_setting('optin')) echo 'selected'?>>On</option>
	<option value=0 <?if(!get_setting('optin')) echo 'selected'?>>Off</option>
	</select></td></tr>
	<?php
}
?>
<tr><td>Email sending*:</td>
<td><select name=send>
<option value=1 <?if($send) echo 'selected'?>>Immediate</option>
<option value=0 <?if(!$send) echo 'selected'?>>Delayed (Cron job)</option>
</select></td></tr>
<?php
if(!$send)
{
	?>
	<tr><td>Mails per hour</td>
	<td><input type=text name=mph value="<?=$mph?>" size=6></td></tr>
	<?php
}
?>
<tr><td>Delay between mails**:</td>
<td><input type=text name=delay value="<?=$delay?>" size=6> seconds</td></tr>
<tr><td>Website name:</td>
<td><input type=text name=site value="<?=get_setting("site") size="20"?>" size=30></td></tr>
<tr><td>Default sender:</td>
<td><input type=text name=sender value="<?=$sender?>" size=30></td></tr>
<tr><td colspan=2 align=center><br>
<input type=submit name=general value="Save General Settings">
</td></tr>
</table>
</form>

Thanks again for any help you will offer.
Jim

<?=$delay?>

look at this place and similar ones
what i can say (maybe I am not experienced in such things), but if you say this is php, then I think it is quite a bad code here. I think it should be

<?php echo $delay; ?>

So there are 3 things to fix:
1. always use <?php instead of <?
2. if you want $delay to be printed, write echo $delay
3. add a semicolon ";" at the end of each sentence
Hope that helps you with problem, cause when I opened this file in my server, I saw many strange things, because my server does not understand <? ?> as being php. Fix like this and I am sure you will make a step forward. If I failed at understanding the problem, then I am sorry. I still hope I helped a bit.

<?=$delay?>

look at this place and similar ones
what i can say (maybe I am not experienced in such things), but if you say this is php, then I think it is quite a bad code here. I think it should be

<?php echo $delay; ?>

So there are 3 things to fix:
1. always use <?php instead of <?
2. if you want $delay to be printed, write echo $delay
3. add a semicolon ";" at the end of each sentence
Hope that helps you with problem, cause when I opened this file in my server, I saw many strange things, because my server does not understand <? ?> as being php. Fix like this and I am sure you will make a step forward. If I failed at understanding the problem, then I am sorry. I still hope I helped a bit.

Thanks for the information. I will tinker with it tonight and hopefully these suggestions will solve my delimna.

<?=$delay?>

look at this place and similar ones
what i can say (maybe I am not experienced in such things), but if you say this is php, then I think it is quite a bad code here. I think

That is an acceptable way to echo a variable within HTML code,

The problem is this line (Line 61):

<td><input type=text name=site value="<?=get_setting("site") size="20"?>" size=30></td></tr>

size="20" is within the PHP braces.

@ez123 : Apart from above, there is one more mistake on the same line-

name=site

should be like -

name="site"

That is an acceptable way to echo a variable within HTML code,

The problem is this line (Line 61):

<td><input type=text name=site value="<?=get_setting("site") size="20"?>" size=30></td></tr>

size="20" is within the PHP braces.

@ez123 : Apart from above, there is one more mistake on the same line-

name=site

should be like -

name="site"

OK, thanks, I will know that from now :)

OK, thanks, I will know that from now :)

ohh...i remember it now..there were so many such errors..your code should have been this way -

<tr><td>Default sender:</td>
<td><input type="text" name="sender" value="<?=$sender?>" size="30"></td></tr>
<tr><td colspan="2" align="center"><br>
<input type="submit" name="general" value="Save General Settings">
</td></tr>
</table>

check that once again

Hi guys,
Many thanks to all that have tired to help me with code problem.
Unfortunely, I have really no knowledge of PHP code, and am getting nowhere with this error.
I was hoping for a solution here, but, I am fiddling with the script and wasting your time and mine.

If someone is willing to review the entire file involved with the error, that would be great, if not, I will not wste any more time in trying to correct the problem.

Jim

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.