parse error in php code

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

Post Reply
New php-forum User
New php-forum User
Posts: 7
Joined: Fri Jan 25, 2013 2:40 am

parse error in php code

Post by carlo2837 » Mon May 06, 2013 4:33 am

Hi hope somebody can help me on this.I am doing an tutorial lesson 18 create database and tables, and I keep getting this error:
Parse error: syntax error, unexpected 'TABLE' (T_STRING) in C:\inetpub\wwwroot\phpconnect.php on line 6
I have tried everything to fix it but I cannot figure it out.I am running Php version 5.4, maybe this is the problem, maybe the code is obsolete though it seems up to date to me.
This is my code:

mysql_connect("localhost", "root", "LaTorre1937##") or die(mysql_error());
mysql_select_db("mydatabase") or die(mysql_error());

FirstName CHAR,
LastName CHAR,
Phone INT,
BirthDate DATE,


Thank you very much I appreciate your help.

User avatar
php-forum Active User
php-forum Active User
Posts: 290
Joined: Sat Mar 23, 2013 8:24 am

Re: parse error in php code

Post by Strider64 » Mon May 06, 2013 6:45 am

No offense, but that website is whacked in using those tutorials on php with mysql. They are also using mysql which is depreciated, use either mysqli or PDO. In my opinion you are wasting your time learning php from that website, but that's just my opinion.

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests