885 users online
225019 members
1218 active today
Advertise Here
Photos
|
Quizzes
|
LiveSecret
|
Memberlist
|
Dictionary
|
News
|
FAQ
Member Spotlight
Millerr
Favs:
movies ill watch anything
Mood:
Flirty
You have 1 new
message
.
Emergency Help
Until you sign up you can't do much. Yes, it's free.
Sign Up Now
Membername:
Password:
Already have an account?
►
Invite Friends
►
Active Members
►
Groups
►
Contests
Moderators
8 online / 23 MPM
Fresh Topics
metacarPI
99.5% of blacks
Link help..
Lucid Nightmare
Desperation.. sjgfkshdsg
Solomon Grundy's beard
can you make a three leaf clover with your tongue?
car for Christmas
More username changes!
Grammars lol
how can i teach a boy to dress better
can you touch your tounge to your nose?
I just woke up
Shutter Bug makes me feel uncomfortable.
Does Earth have bad days?
I'm 15
look my age?
Someone..
Freakin' soap operas!
White people with big noses
last house on the left
More Fresh Topics
LiveWire
/
Technical Forums
/
Web Design & Search Engine Optimization
/ Adding Reply
Adding Reply
Archived Topic:
It will not be bumped to the top of the forum.
Topic
PHP/MySQL Help.
Membername
Not a member?
Sign Up Free
(takes 20 seconds)
Password
Forgotten your password?
Post
Font:
Verdana
Arial Black
Georgia
Comic Sans
Impact
Size:
Tiny
Normal
Big
Huge
Color:
Default
Dark Red
Red
Orange
Brown
Green
Olive
Cyan
Blue
Dark Blue
Indigo
Black
[
Check Spelling
] [
Post Preview
] [
LiveTags
]
FAQ Keyword Search:
Post Options
Favorites Manager
Notify me of new replies to this topic
by email
Notify me of new replies to this topic
by private message
Original Post
RossTheHoss69
Posted at 5:53 pm on Mar. 25, 2008
Okay, anytime I create a PHP file to try and make a new MySQL database using the line:
Code:
<?php
CREATE DATABASE testdb;
?>
I get:
Parse error
: syntax error, unexpected T_STRING in
C:\xampp\htdocs\xampp\69.php
on line
3
.
I'm using Apache.
Help?
Why am I getting this message?
Replies
PiXiE
Posted at 9:21 am on Mar. 26, 2008
mysql =/= php. That is why you need mysql_query().
allsmiles
Posted at 9:17 am on Mar. 26, 2008
It needs to be
Code:
<?php
mysql_connect('serveraddress','username','password');
mysql_query("CREATE DATABASE testdb");
?>
All 2 previous replies displayed.
Tooltip