473,404 Members | 2,170 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,404 software developers and data experts.

when running the code I am getting this problem: ( ! ) Parse error: syntax error, une

1
Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3.     <head>
  4.         <title> Soon Fat Restaurant/Home </title>
  5.     </head>
  6.     <body> 
  7.         <hr color="#FBB917" size="3">
  8.         <p style=" font-size:40pt; color:#153E7E; text-align:center">
  9.             SooN Fat<br/>
  10.         <span style=" font-size:30pt; color:#153E7E; text-align:center">
  11.             Restaurant </span><br/>
  12.         <hr color="#FBB917" size="3">
  13.          </p>
  14.  
  15.  
  16.     <table border="0" align="center" cellpadding="5">
  17.         <tr align="center"> 
  18.         <td> <a href="Home.html"> <font color=red size=5pt>Home </font> </a> </td>
  19.         <td>  </td>
  20.         <td> <a href="Menu.php"><font color=red size=5pt> Menu </font></a></td>
  21.         <td>  </td>
  22.         <td> <a href="Reservation.php"> <font color=red size=5pt>Log in/Create Account</font></a></td>
  23.         <td>  </td>
  24.         <td><a href="Viewall.php"><font color=red size=5pt> View all Accounts</font> </a><td>
  25.         <td>  </td>
  26.         <td><a href="View.php"><font color=red size=5pt> Search for one Account</font> </a><td>
  27.         <td>  </td>
  28.         <td><a href="ContactUs.php"><font color=red size=5pt> Contact Us </font> </a><td>
  29.         </tr>
  30.     </table>
  31.         <hr color="#FBB917" size="3" >
  32. <?php
  33.     $db=mysql_connect("localhost","root","");
  34.  
  35.  
  36.     //Select the customer database
  37.     $er= mysql_select_db("customer");
  38.  
  39.     $query= "SELECT * FROM `personalinfo`;
  40.     print $query;
  41.     $result= mysql_query($query); 
  42.     print <table><caption> <h2> Query results </h2> </caption> ;
  43.     print <tr align='center'>;
  44.  
  45.     $num_rows= mysql_num_rows($result);
  46.     $row= mysql_fetch_array($result);
  47.     $num_fields = mysql_num_fields($result);
  48.  
  49.     //produce the colum label
  50.     $keys = array_keys($row);
  51.     for($index= 0; $index < $num_fields; $index++)
  52.         $i= 2* $index +1;
  53.         print <th> php . $keys[$i] . </th>;
  54.     print </tr>;
  55.  
  56.     //output the values of the fields in the rows
  57.     for($row_num=0; $row_num < $num_rows; $row_num++)
  58.     {
  59.         print <tr align='center'>;
  60.         $values = array_values($row);
  61.         for($index=0; $index < $num_fields; $index++)
  62.          {
  63.             $i= 2* $index +1;
  64.             $value=htmlspecialchars($values[$i]);
  65.             print <th> . $value . </th>;
  66.          }
  67.         print </tr>;
  68.         $row= mysql_fetch_array($result);
  69.     }
  70. print </table>;
  71. ?></body>
  72. </html>
May 5 '12 #1
2 1405
Rabbit
12,516 Expert Mod 8TB
Please use code tags when posting code.

You haven't posted the full error code.
May 5 '12 #2
Dormilich
8,658 Expert Mod 8TB
there are lots of missing quotation marks.
May 5 '12 #3

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

Similar topics

4
by: needhelp08 | last post by:
I am getting the error Parse error: syntax error, unexpected T_VARIABLE on line 4 but I can't seem to find what is wrong. Could someone please help. <?php $conn = @mysql_connect("localhost",...
5
praclarush
by: praclarush | last post by:
I've just started php, and this is a class assignment, but my question is I’m getting this error PHP Parse error: syntax error, unexpected T_IF, expecting T_VARIABLE or '$' in...
2
by: fburn | last post by:
I need some help with an error I'm getting using php 5.2.5 running on linux. I receive an error: Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or...
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 ...
25
by: URmusicandvideo | last post by:
I have just finshed my first php code and posted it online and I am getting a Parse error: syntax error, unexpected T_VARIABLE in /home/hydeands/public_html/phpmail.php on line 45 But when I look...
3
by: CYNTHIA CUTRER | last post by:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> ...
4
by: 9139530 | last post by:
Hey, I'm getting the error: Parse error: syntax error, unexpected T_VARIABLE in Z:\home\baza\www\get2.php on line 7 with this code (have 2 pages , html-from page (reguser.php) and...
5
by: vultren | last post by:
Parse error: syntax error, unexpected $end in I keep getting that, I have no clue where to fix it. Any help would be VERY APPRECIATED! <?php if(isset($_POST)) { // EDIT THE 2 LINES...
2
by: Vicki Hendra | last post by:
Hi I am new to php fullstop I and colleagues have setup wordpress blogs for our local towns, giving the local businesses free advertisment. Part of the problem started when using wordpress...
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.