MyAdmin can access my databases but I cant
Posted by: Scott (---.bulldogdsl.com)
Date: March 19, 2006 03:23PM

Hi.

This code doesn't work:

<?php

$link = mysql_connect("localhost","root",""winking smiley;
@mysql_select_db("blog"winking smiley or die( 'Unable to select database');

mysql_query( INSERT INTO 'entry' ( 'id' , 'title' , 'date' , 'content' ) VALUES ('1', 'the title', getdate(), 'some content - knarly' ) );

mysql_close();

?>

I get this error:

Parse error: syntax error, unexpected T_STRING in c:\wamp\www\scottsblog\insertentry.php on line 6

MyAdmin can access my databases fine, but I can't. I even copied and pasted that code for entring stuff from myadmin to test it with no result.

My files are in the www directory.

Please help!

Options: ReplyQuote
Re: MyAdmin can access my databases but I cant
Posted by: Scott (---.bulldogdsl.com)
Date: March 19, 2006 04:36PM

Ah, forget it I fixed it now! Just a syntax problem. I guess that's what I get for rushing!

Options: ReplyQuote
Re: MyAdmin can access my databases but I cant
Posted by: CyberSpatium (---.hsd1.or.comcast.net)
Date: March 19, 2006 08:25PM

you get different type of errors depened on what type of error you created in your php cpde.

Options: ReplyQuote


Sorry, only registered users may post in this forum.