Jump to content

Parse error: syntax error, unexpected T_STRING in W:\www\blog\index.php on line


Recommended Posts

Problem connecting? Parse error: syntax error, unexpected T

 

Postby soc86 » Mon Sep 12, 2011 6:24 am

I keep getting the following error:

 

 

Parse error: syntax error, unexpected T_STRING in W:\www\blog\index.php on line 2

 

For some reason if you look at my code i believe there is something wrong with the php connecting to my sql database:

 

 

 

<?php

 

mysql_connect('localhost','root','root');

  mysql_select_db('blog');

?>

<html>

<head>

<title>Show Me Blog</title>

</head>

<body>

Here is my blog<hr/>

 

 

 

<table border='1'>

<tr><td>Blog Title</td><td>category</td></tr>

<tr><td colspan='2'>content</td><td></tr>

</table>

 

 

</body>

</html>

 

 

 

I am using uniform server http://www.uniformserver.com/ and i have checked and my username and password is root?

this doesn't make much sense.. are you sure this is the relevant code..

as to your other inquiry.. if your password for your mysql server is "root", then that should be correct

I have run into a similar issue to this before, some kind of encoding issue or something. I never really got to the bottom of it. Just copy the contents of the file, delete it (on the server as well), and recreate it. Worked for me..

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.