The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

> Help with unexpected T_VARIABLE
tyler.watkins
post Apr 5 2012, 04:17 PM
Post #1


Novice
**

Group: Members
Posts: 27
Joined: 6-March 12
Member No.: 16,654



<?php
$mysql_database="********";
$mysql_host="********";
$mysql_user="******";
$mysql_password="******";

$link= mysql_connect($mysql_host, $mysql_user, $mysql_password);

if (!$con)
{
die('Could not connect: ' . mysql_error());
}


$fname=$_POST['fname'];
$lname=$_POST['lname'];
$user=$_POST['username'];
$password=$_POST['password'];
$email=$_POST['email'];


mysql_select_db("$mysql_database",$con)

$table="CREATE TABLE username <-------This is the line the problem is on, it says "Parse error: syntax error, unexpected T_VARIABLE". Please help!!
($fname varchar(30),
$lname varchar(30),
$username varchar(30),
$password varchar(30),
$email varchar(30)
)";

mysql_query($table,$con);
mysql_close($con);
?>




This information is from a form.

This post has been edited by tyler.watkins: Apr 5 2012, 04:18 PM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 27th April 2024 - 01:33 PM