Jump to content

Recommended Posts

I have placed the following piece of code in the body of my page(I have taken out my username and password):

 

L17:<?php

L18:$db=mysql_connect("**********","*******","*******") || die;

L19:mysql_select_db("********");

L20:mysql_close()

L21:?>

 

But when I check the code I keep getting the following error message:

 

XML Parsing Error: no element found

Location: http://usernet.scm.tees.ac.uk/users/g7068821/wes/wes_ica/

Line Number 18, Column 1:

^

Link to comment
https://forums.phpfreaks.com/topic/171267-database-connection-problem/
Share on other sites

Here is the page source code:

Any ideas?

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"    "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >

<html>

<head>

 

<link rel="stylesheet" type="text/css" href="wes_ica.css" />

<script type="text/javascript" src="wes_ica.js"></script>

<script type="text/javascript" src="../../../u0000700/wes_ica_08_09/wes_ica.js"></script>

<title>Web Scripting ICA</title>

 

</head>

 

<body onload="globalclock()" BGCOLOR="E0FFFF">

 

<br />

 

<b>Warning</b>:  mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Lost connection to MySQL server at 'reading initial communication packet', system error: 111 in <b>/web/users/g7068821/wes/wes_ica/index.php</b> on line <b>18</b><br />

 

Guest
This topic is now 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.