473,320 Members | 1,978 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE

I am new to php. I use the below query,

Expand|Select|Wrap|Line Numbers
  1. <?php
  2. if(isset($_POST['btn']))
  3. {
  4. $table=<<<table
  5. <table>
  6. <thead>
  7. <tr>        
  8. <th style="text-align:center">"#"</font></th>
  9. <th>1</font></th>
  10. <th>2</font></th>
  11. <th>3</font></th>
  12. <th>4</font></th>
  13. <th>5</font></th>
  14. <th>6</font></th>
  15. <th>7</font></th>
  16. <th>8</font></th>
  17. <th>9</font></th>
  18. <th>10</font></th>
  19. <th>11</font></th>
  20. <th>12</font></th>
  21. <th>13</font></th>
  22. <th>14</font></th>
  23. <th>15</font></th>
  24. <th>16</font></th>
  25. <th>17</font></th>
  26. <th>18</font></th>
  27. <th>19</font></th>
  28. <th>20</font></th>
  29. <th>21</font></th>
  30. <th>22</font></th>
  31. <th>23</font></th>
  32. <th>24</font></th>
  33. <th>25</font></th>
  34. <th>26</font></th>
  35. <th>27</font></th>
  36. <th>28</font></th>
  37. <th>29</font></th>
  38. <th>30</font></th>
  39. <th>31</font></th>
  40. </tr>
  41. </thead>
  42. <tbody>
  43. include ("DBconnection.php");
  44. $month_N="1";
  45. $Year_No = date("Y");
  46. $CurrentDate = date('Y-m-d');
  47. $Employee = $_POST['Employee'];
  48. //echo $Employe;
  49. if($Employee!="" && $Employee!="Select"){
  50. $EmployeeQuery="Select employeedetails_id, concat(firstname,' ', lastname) as EmpName, employeeenrollnumber from employeedetails where employeedetails.Status!='Dismissed' and employeedetails_id=".$Employee." order by firstname";
  51. }
  52. table;
  53. }
It give the Syntax Error for me..

Please help me any one ..
Thanks...
Sep 10 '13 #1
1 1650
Rabbit
12,516 Expert Mod 8TB
What's going on with line 4-42? You can't just have HTML within PHP tags like that. If you want to output HTML within PHP tags, you need to echo them.
Sep 10 '13 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
kestrel
by: kestrel | last post by:
I have some html code that is supposed to be displayed by php echo. But for some reason i keep getting a syntax error, and i cant figure out what is going on. Heres what i have <?php...
3
by: basswhizz | last post by:
Hi everyone im a high school student and I'm having trouble with one of my projects could you please help!! I'm getting this error message. Parse error: syntax error, unexpected...
3
by: sclarkstone | last post by:
Im getting this error; Parse error: syntax error, unexpected T_STRING, expecting ':' or ';' with this line; header ('postcodesearch.php?e=nw&pcode=',); I cant find whats wrong, can anyone...
3
paulrajj
by: paulrajj | last post by:
hi to all, i am getting syntax error on my code.. Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in D:\xampp\htdocs\Dummy\paulraj\matrim\exam.php on line 62 ...
10
by: benicio | last post by:
Parse error: syntax error, unexpected T_STRING, expecting '(' in C:\wamp\www\study_group\includes\functions.php on line 19 I got this error and this syntax is from 8 to 19th line. <?php ...
1
by: karine | last post by:
Hi, I keep getting this error message "Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ']' in /home/env49986/public_html/welcome.php on line 16" below is the code ...
1
by: Carrie Kemp | last post by:
I am having an error that reads the code that is in question is: $list_data->save($dataFile); How would I fix this?
5
by: Adam Pelling | last post by:
I'm getting this error Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /home/neblncbt/public_html/forum/includes/acp/acp_board.php on line 69 Here is the...
2
by: lenamarie | last post by:
I received this full message today after updating the copyright year. Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in...
4
by: tiff zhan | last post by:
the error public function getTable($tableName) { if (!isset($this->_tables)) { $this->_tables = Mage::getSingleton('core/resource')->getTableName($tableName); ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.