Hello - I am super green to php and mysql. I have received the following error: Parse error: syntax error, unexpected $end in C:\website\chart.php on line 84... I have been through the code matching all of my {}, [], "", and '', and I can't find anything mis-matched. Also, there is no line 84. Any insights would be greatly appreciated. The code ia as follows: -
<?php
-
-
$conn = @new mysqli('localhost', 'root', 'bonkers1', 'prodtestdata');
-
-
if (mysqli_connect_errno() != 0)
-
{
-
$errno = mysqli_connect_errno();
-
$errmsg = mysqli_connect_error();
-
echo "Connect Failed with: ($errno) $errmsg<br/>\n";
-
exit;
-
}
-
-
$conn->query("SET NAMES 'utf8'");
-
-
// prepare the query
-
$query_str = "SELECT * FROM prodtestdata";
-
$result = $conn->query($query_str);
-
if ($result === FALSE)
-
{
-
$errno = $conn->errno;
-
$errmsg = $conn->error;
-
echo "Connect Failed with: ($errno) $errmsg<br/>\n";
-
$conn->close();
-
exit;
-
}
-
else
-
{
-
echo <<<EOM
-
<table>
-
<tr>
-
<td>Product Name</td>
-
<td>Product Size</td>
-
<td>Structural Rating</td>
-
<td>Air Rating</td>
-
<td>Water Rating</td>
-
<td>U-Factor</td>
-
<td>SHGC</td>
-
<td>VT</td>
-
</tr>
-
EOM;
-
-
// get the data
-
while (($row_data = @$result->fetch_assoc()) !==NULL)
-
{
-
echo <<<EOM
-
<tr>
-
<td>{$row_data['prod_name']}</td>
-
<td>{$row_data['prod_size']}</td>
-
<td>{$row_data['aama_rate']}</td>
-
<td>{$row_data['air_rate']}</td>
-
<td>{$row_data['water_rate']}</td>
-
<td>{$row_data['u_rate']}</td>
-
<td>{$row_data['shgc_rate']}</td>
-
<td>{$row_data['vt_rate']}</td>
-
</tr>
-
-
EOM;
-
}
-
-
echo <<<EOTABLE
-
</table>
-
-
EOTABLE;
-
//
-
// clean up results
-
//
-
$result->close();
-
}
-
//
-
// clean up connection
-
//
-
$conn->close();
-
-
?>
-
-
Much Thanks,
Ann
3 2598
line #57: Heredoc closing delimiter must start at the beginning of the line.
Well I'll be - I would have never found that - works just fine now - thank you so much! Have a great weekend!
thanks. well, I wouldn’t know myself had I not have had such problems myself.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Wescotte |
last post by:
The error message Parse error: syntax error, unexpected $end in FILE on
line X is one I run into frequently and I know the cause is I missed an
ending quote.
Is there an easy way to determine...
|
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...
|
by: ajd335 |
last post by:
Hi all...
I am getting an error Parse error: syntax error, unexpected $end in http:/..... on line 117...(117 is the EOF)..
can you plz help me out..I have checked out for the < , > ,{ ,} etc.......
|
by: akohistani |
last post by:
I am having Parse error problem with my newly purchased Php upload script I have uploaded the script and I get the error below
Parse error: syntax error, unexpected $end in URL/functions.php on...
|
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
...
|
by: TanjaPetro |
last post by:
Hello to everyone.
I changed a few files on my site and when I tried to log into the admin area I got this message:
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting...
|
by: Topbidder |
last post by:
I have this error on the code
Parse error: syntax error, unexpected '"' in /home/topbidd/public_html/bid2/bid_classic.php on line 159
now i thought the error was this
It seems that the...
|
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>
...
|
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...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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,...
|
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...
|
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...
| | |