El_Dudereno Posted August 21, 2009 Share Posted August 21, 2009 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 More sharing options...
trq Posted August 21, 2009 Share Posted August 21, 2009 Right click and view source, what is your actual error? Seems your document is being sent as xml which browsers don't like if its not well formatted. Link to comment https://forums.phpfreaks.com/topic/171267-database-connection-problem/#findComment-903126 Share on other sites More sharing options...
El_Dudereno Posted August 21, 2009 Author Share Posted August 21, 2009 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 /> Link to comment https://forums.phpfreaks.com/topic/171267-database-connection-problem/#findComment-903127 Share on other sites More sharing options...
Daniel0 Posted August 21, 2009 Share Posted August 21, 2009 Closed as duplicate. Please do not open multiple topics about the same issue. Link to comment https://forums.phpfreaks.com/topic/171267-database-connection-problem/#findComment-903138 Share on other sites More sharing options...
Recommended Posts