Jump to content

Really Wierd coding error??


georgebates

Recommended Posts

Hi There,

 

I am coding a piece of script and have had a really weird error. The error is

Parse error: syntax error, unexpected T_VARIABLE in /home/a3358855/public_html/art_glass.php on line 1

 

i got it when using this code.

<?php
$hostUrl = '*****';
$userName = '*****';
$password = '****';
// connect to database
$connectID = mysql_connect($hostUrl, $userName, $password)
  or die ("Sorry, can't connect to database");

//select the database to read from
mysql_select_db("a3358855_test", $connectID)
  or die ("Unable to select database");


  
  
?>

<?xml version="1.0" encoding="iso-8859-1" standalone="yes"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<head>

  <meta http-equiv="content-type" content="text/html;  charset=iso-8859-1" />
<link rel="stylesheet" type="text/css" href="pom.css"  />

<meta name="description" content="Hanmer Springs art gallery featuring local art.">
<meta name="keywords" content="art, jewellery, dyrberg, kern, claire wilcox, melanie hammet, rebecca herring, new zealand, art, hanmer springs">
<meta name="author" content="George Bates">

<title>Majuba Gallery | Art Glass</title>

</head>

<body onload="checkCookie()"><div id="wrap">

<div id="header"><br />
</div>
<img  src="images/header.jpg" width="790" height="228" alt="" />

<div id="avmenu">
<h2 class="hide">Menu:</h2>
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="gallery_artist_ch.php">Art Gallery</a></li>
<li><a href="jewellery_choose.html">Jewellery</a></li>
<li><a href="art_glass.html">Art Glass</a></li>
<li><a href="#">Sculpture</a></li>
<li><a href="contact_us.html">Contact Us</a></li>
</ul>
<!-- end of freefind search box html -->
<p><a href="http://mail.majubagallery.co.nz/roundcube/" target="_blank">Staff Webmail</a></p>
</div>
<div id="extras">
<h3> <br />
    </h3>
</div>
<div id="content">
 
<h2>Art Glass </h2>
<p>We stock a small range of individual art glass pieces from many different artists around New Zealand.</p>

<?php 

ini_set('display_errors', 1); 
ini_set('log_errors', 1); 
ini_set('error_log', dirname(__FILE__) . '/error_log.txt'); 
error_reporting(E_ALL);

$myResult = mysql_query('SELECT art_glass.* FROM art_glass', $connectID)
  or die ("Unable to select from database");

while ($row=mysql_fetch_array($myResult, MYSQL_ASSOC)) {

	print "<h3>".$row['name']."</h3>\n";
	print "<p>Price: $".$row['price']."</p>\n";
	print '<br/>'."\n";
	print "<a href=".$row['big_url']."><img src=".$row['thumb_url']." /></a>";
  
}
?>

<p>  </p>
</div>

<div id="footer">
  <p>Copyright © Majuba Gallery 2009. All Rights Reserved. Design: <a href="mailto: [email protected]">George Bates</a>  </p>
  <table width="133" border="0" cellspacing="0" cellpadding="3">
    <tr><td align="center"><img src="http://www.website-hit-counters.com/cgi-bin/image.pl?URL=176823-6299" alt="Views" border="0" ></td>
    </tr><tr>
      <td align="center"> </td></tr></table>
</div>

</div>
</body>
</html>

 

The wierd thing is that i have used the same code for another page on the same site and it didn't have this problme?

 

Thanks George  :D

Link to comment
https://forums.phpfreaks.com/topic/195533-really-wierd-coding-error/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.