|
-
Oct 22nd, 2008, 08:49 AM
#1
Thread Starter
Frenzied Member
Urgent Help Plz
Hey,
I'm having some problems here.
You can see what it does when you click this link http://www.webspace4rent.biz/guestbook/install.php but it tells me there isnt a page located there.
i get this in the error log.
[22-Oct-2008 09:29:35] PHP Parse error: syntax error, unexpected T_VARIABLE in /home/webspace/public_html/guestbook/install.php on line 14
[22-Oct-2008 09:29:39] PHP Parse error: syntax error, unexpected T_VARIABLE in /home/webspace/public_html/guestbook/install.php on line 14
[22-Oct-2008 09:29:45] PHP Parse error: syntax error, unexpected T_VARIABLE in /home/webspace/public_html/guestbook/install.php on line 14
[22-Oct-2008 09:38:40] PHP Parse error: syntax error, unexpected T_VARIABLE in /home/webspace/public_html/guestbook/install.php on line 14
[22-Oct-2008 09:42:28] PHP Parse error: syntax error, unexpected T_VARIABLE in /home/webspace/public_html/guestbook/install.php on line 14
[22-Oct-2008 09:45:42] PHP Parse error: syntax error, unexpected T_VARIABLE in /home/webspace/public_html/guestbook/install.php on line 14
[22-Oct-2008 09:50:07] PHP Parse error: syntax error, unexpected T_VARIABLE in /home/webspace/public_html/guestbook/install.php on line 14
can anyone help i use the following code.
PHP Code:
<html>
<head> <title>Install Table</title> </head>
<body>
<?php
#Connect To MySQL
$conn = @mysql_connect( "localhost", "webspace_guest", "brodie" )
or die( "Could not connect to database" );
#Select The Database
$rs = @mysql_select_db( "webspace_guest" $conn )
or die( "could not select database" );
#Create The SQL Query
$query = "id int(4) auto_increment,";
$query = "name varchar(50),";
$query = "email varchar(50),";
$query = "comments text,";
$query = "time timestamp(14), primary key(id)";
$sql = "create table guestnook( $query ) ";
#Execute The Query
$rs = @mysql_query ($sql)
or die("<h3>Could not create guestbook table <br>
Does it already exist?</h3>");
#Confirm The Result
echo( "<h3>Created guestbook table</h3>" );
?>
</body> </html>
Last edited by Jamie_Garland; Oct 22nd, 2008 at 08:56 AM.
come back and mark your original post as resoved if your problem is fixed
Jamie Garland
-
Oct 22nd, 2008, 09:07 AM
#2
Re: Urgent Help Plz
This was missing a comma
PHP Code:
$rs = @mysql_select_db( "webspace_guest", $conn ) or die( "could not select database" );
My usual boring signature: Something
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|