Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Parse Error

Status
Not open for further replies.

rogerzebra

Technical User
May 19, 2004
216
SE
I'm back...
Can anyone check this code to see what's wrong and why I get a parse error. It's supposed to be something after the </html>..what's missing??

Any input would be much appreciated.

Code:
<?php require("main_test.php"); ?>

<?php

    /*config connection to database*/
    $dbhost = 'localhost';
    $dbusername = 'root';
    $dbpassw = 'matrix';
    $database_name = 'intranet';
    /*connect to the database*/
	if(mysql_connect($dbhost,$dbusername,$dbpassw)){
       $connection = mysql_connect($dbhost,$dbusername,$dbpassw);
       mysql_select_db($database_name,$connection);
       return $connection;
    }else{
       print("<b>Can't connect to the database.</b>");
?>

<html>
<head>
<title>My Dynamic Page</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#FFFFFF" text="#000000">
<table width="80%" border="1" cellspacing="0" cellpadding="0">
  <tr valign="top"> 
    <td colspan="2">
      <h5>My dynamic page:-)</h5>
    </td>
  </tr>
  <tr valign="top"> 
    <td width="200">
      <h6>The news</h6>
      <?php getNews();?>
    </td>
    <td width="340"> 
      <h6><?php getContent($story);?></h6>echo $story;
    </td>
  </tr>
  <tr valign="top"> 
    <td width="200"> </td>
    <td width="340"> </td>
  </tr>
</table>
</body>
</html>
Thanks
/rz
 
thanks cLFlaVA,
at least one problem solved..it still something wrong though??
Now I got a blank page.
 
*SOLVED*
Thanks fellows.

I got this to work now.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top