simonttz Posted February 5, 2010 Share Posted February 5, 2010 I get this Error Message: Parse error: syntax error, unexpected ':' in D:\Hosting\5397892\html\connectionfile.php on line 5 I created the connectionfile.php file in dreamweaver, saved it to my desktop, transferred it to my server from my local system with Fireftp, and it gave me this message. It may be because I did not set user privileges for the user I stated in the PHP file's code (connectionfile.php) Or because I did not put the connectionfile.php into the public_html folder in my server which I do not have.. I just created a directory called public_html and It still did not work... I am using Godaddy's PHPMYADMIN which for some reason is called starfield technologies.. I called them earlier and they said they cannot help me with phpmyadmin.. The code I used is as follows: <?php //opens connection to mysql server $dbc = mysql_connect('thankyouanime4','username','password'); if (!$dbc) { die('Not connected' : . mysql_error()); } //Select database $db_selected = mysql_select_db("thankyouanime4", $dbc); if (!$db_selected) { die ("can't connect :" . mysql_error()); } //test $query="UPDATE logininfo SET email='hopethisworks' WHERE username='username'"; $result=mysql_query($query); ?> I just want to run it from localhost so i can test it out and see what it does... Idk if this has something to do with it but check this out: on this tutorial it shows his server is running from LOCALHOST... on every other tutorial on the web it says the same thing. on MY phpmyadmin home page dashboard thing it shows the IP address to Godaddy HQ in Scottdale AZ. here is the video tutorial I was working from: Freeze frame at 0:30 and analyze: http://www.youtube.com/watch?v=ylKfl...D94BE42620925B This is what my screen looks like on the homepage: http://i47.tinypic.com/14dnho9.jpg If you can give me some advice or suggestions that would be great. Thank you Simon Heit Quote Link to comment Share on other sites More sharing options...
trq Posted February 5, 2010 Share Posted February 5, 2010 It may be because I did not set user privileges for the user I stated in the PHP file's code (connectionfile.php) Or because I did not put the connectionfile.php into the public_html folder in my server which I do not have.. I just created a directory called public_html and It still did not work... Or, like the error says, you have a syntax error. This line.... die('Not connected' : . mysql_error()); should be.... die('Not connected:' . mysql_error()); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.