php code error

Thread Solved

Join Date: Nov 2009
Posts: 4
Reputation: ez123 is an unknown quantity at this point 
Solved Threads: 0
ez123 ez123 is offline Offline
Newbie Poster

php code error

 
0
  #1
20 Days Ago
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.
Reply With Quote Quick reply to this message  
Join Date: May 2009
Posts: 11
Reputation: kolibrizas is an unknown quantity at this point 
Solved Threads: 1
kolibrizas's Avatar
kolibrizas kolibrizas is offline Offline
Newbie Poster
 
0
  #2
20 Days Ago
Why don't you show the code near those lines? You look like having forgotten a ";" at the end of line 60
Reply With Quote Quick reply to this message  
Join Date: Sep 2008
Posts: 1,563
Reputation: BestJewSinceJC is a name known to all BestJewSinceJC is a name known to all BestJewSinceJC is a name known to all BestJewSinceJC is a name known to all BestJewSinceJC is a name known to all BestJewSinceJC is a name known to all 
Solved Threads: 196
BestJewSinceJC BestJewSinceJC is offline Offline
Posting Virtuoso
 
0
  #3
20 Days Ago
why would you post 'php code error' in the java forum?
Out.
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 4,182
Reputation: peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of 
Solved Threads: 481
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is offline Offline
Code tags enforcer
 
0
  #4
20 Days Ago
moved
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)

LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Reply With Quote Quick reply to this message  
Join Date: Nov 2009
Posts: 4
Reputation: ez123 is an unknown quantity at this point 
Solved Threads: 0
ez123 ez123 is offline Offline
Newbie Poster

PHP error

 
0
  #5
20 Days Ago
Originally Posted by kolibrizas View Post
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.

  1. <script language=javascript>
  2. function validateForm(frm)
  3. {
  4. var pass=frm.pass.value;
  5. var repass=frm.repass.value;
  6.  
  7. if(pass!=repass)
  8. {
  9. alert("Password confirmation failed");
  10. return false;
  11. }
  12.  
  13. frm.submit();
  14. }
  15. </script>
  16.  
  17. <h1 align=center>Future 2019 AD Autoresponder Settings</h1>
  18.  
  19. <form method=post>
  20. <table align=center style="border:1px solid black;" cellpadding=7>
  21. <tr><th colspan=2>Administrator login info</th></tr>
  22. <tr><td width=150>Change Password:</td>
  23. <td width=300><input type=password name=pass size=30></td></tr>
  24. <tr><td width=150>Confirm New Password:</td>
  25. <td width=300><input type=password name=repass size=30></td></tr>
  26. <tr><td colspan=2 align=center>
  27. <input type=hidden name=admin value=1>
  28. <input type=button onclick="javascript:validateForm(this.form);" value="Save Admin Info">
  29. </td></tr>
  30. <tr><td colspan=2>&nbsp;</td></tr>
  31. <tr><th colspan=2>General Site Settings</th></tr>
  32. <?php
  33. if($register)
  34. {
  35. ?>
  36. <tr><td>Double opt-in:</td>
  37. <td><select name=optin>
  38. <option value=1 <?if(get_setting('optin')) echo 'selected'?>>On</option>
  39. <option value=0 <?if(!get_setting('optin')) echo 'selected'?>>Off</option>
  40. </select></td></tr>
  41. <?php
  42. }
  43. ?>
  44. <tr><td>Email sending*:</td>
  45. <td><select name=send>
  46. <option value=1 <?if($send) echo 'selected'?>>Immediate</option>
  47. <option value=0 <?if(!$send) echo 'selected'?>>Delayed (Cron job)</option>
  48. </select></td></tr>
  49. <?php
  50. if(!$send)
  51. {
  52. ?>
  53. <tr><td>Mails per hour</td>
  54. <td><input type=text name=mph value="<?=$mph?>" size=6></td></tr>
  55. <?php
  56. }
  57. ?>
  58. <tr><td>Delay between mails**:</td>
  59. <td><input type=text name=delay value="<?=$delay?>" size=6> seconds</td></tr>
  60. <tr><td>Website name:</td>
  61. <td><input type=text name=site value="<?=get_setting("site") size="20"?>" size=30></td></tr>
  62. <tr><td>Default sender:</td>
  63. <td><input type=text name=sender value="<?=$sender?>" size=30></td></tr>
  64. <tr><td colspan=2 align=center><br>
  65. <input type=submit name=general value="Save General Settings">
  66. </td></tr>
  67. </table>
  68. </form>

Thanks again for any help you will offer.
Jim
Last edited by Ezzaral; 20 Days Ago at 6:55 pm. Reason: Added [code] [/code] tags. Please use them to format any code that you post.
Reply With Quote Quick reply to this message  
Join Date: May 2009
Posts: 11
Reputation: kolibrizas is an unknown quantity at this point 
Solved Threads: 1
kolibrizas's Avatar
kolibrizas kolibrizas is offline Offline
Newbie Poster
 
0
  #6
20 Days Ago
  1. <?=$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
  1. <?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.
Reply With Quote Quick reply to this message  
Join Date: Nov 2009
Posts: 4
Reputation: ez123 is an unknown quantity at this point 
Solved Threads: 0
ez123 ez123 is offline Offline
Newbie Poster

PHP ERROR

 
-1
  #7
20 Days Ago
Originally Posted by kolibrizas View Post
  1. <?=$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
  1. <?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.
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 524
Reputation: Will Gresham is on a distinguished road 
Solved Threads: 86
Sponsor
Will Gresham's Avatar
Will Gresham Will Gresham is offline Offline
Posting Pro
 
1
  #8
20 Days Ago
Originally Posted by kolibrizas View Post
  1. <?=$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):
  1. <td><input type=text name=site value="<?=get_setting("site") size="20"?>" size=30></td></tr>
size="20" is within the PHP braces.
AJAX is not a programming language, scripting language or any other sort of language.
It is acheived by using JavaScript http functions.
So, AJAX = JavaScript.
Reply With Quote Quick reply to this message  
Join Date: Sep 2009
Posts: 521
Reputation: network18 is an unknown quantity at this point 
Solved Threads: 61
network18 network18 is offline Offline
Posting Pro
 
0
  #9
20 Days Ago
@ez123 : Apart from above, there is one more mistake on the same line-
  1. name=site
should be like -
  1. name="site"
"The discipline of writing something down is the first step towards making it happen."

follow me on twitter
Reply With Quote Quick reply to this message  
Join Date: May 2009
Posts: 11
Reputation: kolibrizas is an unknown quantity at this point 
Solved Threads: 1
kolibrizas's Avatar
kolibrizas kolibrizas is offline Offline
Newbie Poster
 
0
  #10
20 Days Ago
Originally Posted by Will Gresham View Post
That is an acceptable way to echo a variable within HTML code,

The problem is this line (Line 61):
  1. <td><input type=text name=site value="<?=get_setting("site") size="20"?>" size=30></td></tr>
size="20" is within the PHP braces.
Originally Posted by network18 View Post
@ez123 : Apart from above, there is one more mistake on the same line-
  1. name=site
should be like -
  1. name="site"
OK, thanks, I will know that from now
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC