thread closed

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
simonttz
Forum Newbie
Posts: 5
Joined: Thu Feb 04, 2010 11:42 pm

thread closed

Post by simonttz »

thread closed
Last edited by simonttz on Fri Feb 05, 2010 3:17 pm, edited 1 time in total.
rahulzatakia
Forum Commoner
Posts: 59
Joined: Fri Feb 05, 2010 12:01 am
Location: Ahmedabad

Re: Parse Error; Syntax error (PHPMYADMIN)

Post by rahulzatakia »

Hi,

please replace your first five lines code with the below code:

<?php
//opens connection to mysql server
$dbc = mysql_connect('thankyouanime4','username','password');
if (!$dbc) {
die('Not connected:' . mysql_error());
}

There was error in die() on line 5 as you have put ':' outside of single quote
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: Parse Error; Syntax error (PHPMYADMIN)

Post by califdon »

rahulzatakia gave you the correct diagnosis and solution.

For your future guidance, the error message will tell you exactly what is wrong, saving you much time and trouble. It told you what file the error was in (connectionfile.php), what line the error was on (line 5), what kind of an error it was (syntax error), and the exact character that was wrong (unexpected ':' ).

If you will learn to read the error messages, you won't have to go through all that confusion about unrelated things. Please don't misunderstand, we are glad to help you, I'm just trying to save you time and trouble.
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: Parse Error; Syntax error (PHPMYADMIN)

Post by califdon »

rahulzatakia gave you the correct diagnosis and solution.

For your future guidance, the error message will tell you exactly what is wrong, saving you much time and trouble. It told you what file the error was in (connectionfile.php), what line the error was on (line 5), what kind of an error it was (syntax error), and the exact character that was wrong (unexpected ':' ).

If you will learn to read the error messages, you won't have to go through all that confusion about unrelated things. Please don't misunderstand, we are glad to help you, I'm just trying to save you time and trouble.
simonttz
Forum Newbie
Posts: 5
Joined: Thu Feb 04, 2010 11:42 pm

Re: Parse Error; Syntax error (PHPMYADMIN)

Post by simonttz »

thank you so much. you guys have been very helpful.

Also - Since Godaddy does not permit the user privileges to be set in phpmyadmin is it safe to allow users to sign up and register without fear on my part that someone will be granted privileges that I would not want...?
Post Reply