/    Sign up×
Community /Pin to ProfileBookmark

Insert into problem

Hello i have a problem with the script:

[code=php]
<?PHP
if (isset($_POST[“submit”])) {
//DB Variables
$user = “opssrv_opsdata; #username
$pass = “000000123”; #password
$dbname = “opssrv_data”; #database name
$tablename = “web_members”; #table name

$dbh=mysql_connect (“localhost”, “$user”, “$pass”) or die (‘I cannot connect to the database because: ‘ . mysql_error());
mysql_select_db (“$dbname”);

$query = “INSERT INTO $tablename VALUES (”,’$_POST[ops_name]’,’$_POST[rec_by]’,’$_POST[game_slct]’,’$_POST[clan]’,’$_POST[fname]’,’$_POST[lname]’,’$_POST[gender]’,’$_POST[country]’,’$_POST[skype]’,’$_POST[xfire]’,’$_POST[msn]’,’$_POST[yahoo]’,’$_POST[email]’,’$_POST[postalc]’)”; #should be one line

mysql_db_query ($dbname, $query, $dbh);
mysql_close ($dbh);
}
?>

<html>
<head>
<title>OPS* User Administration Panel</title>
</head>
<form method=”POST” action=”<?PHP echo $_SERVER[“PHP_SELF”]; ?>”>
<font type=”arial” size=”2″ color=”black” />
OPS Username:
<input type=”text” name=”ops_name” style=”background-color: #444444; color:#FF6600″ size=”15″ maxlength=”15″ />
<br>
<br>
Recruited By:
<input type=”text” name=”rec_by” style=”background-color: #444444; color:#FF6600″ size=”15″ maxlength=”15″ />
<br>
<br>
Game Selection:
<input type=”text” name=”game_slct” style=”background-color: #444444; color:#FF6600″ size=”15″ maxlength=”15″ />
<br>
<br>
Clan:
<input type=”text” name=”clan” style=”background-color: #444444; color:#FF6600″ size=”15″ maxlength=”15″ />
<br>
<br>
First Name:
<input type=”text” name=”fname” style=”background-color: #444444; color:#FF6600″ size=”15″ maxlength=”15″ />
<br>
<br>
Last Name:
<input type=”text” name=”lname” style=”background-color: #444444; color:#FF6600″ size=”15″ maxlength=”15″ />
<br>
<br>
Gender:
<input type=”text” name=”gender” style=”background-color: #444444; color:#FF6600″ size=”15″ maxlength=”6″ />
<br>
<br>
Country:
<input type=”text” name=”country” style=”background-color: #444444; color:#FF6600″ size=”15″ maxlength=”30″ />
<br>
<br>
Skype Username:
<input type=”text” name=”skype” style=”background-color: #444444; color:#FF6600″ size=”15″ maxlength=”15″ />
<br>
<br>
X Fire Username:
<input type=”text” name=”xfire” style=”background-color: #444444; color:#FF6600″ size=”15″ maxlength=”15″ />
<br>
<br>
MSN Address:
<input type=”text” name=”msn” style=”background-color: #444444; color:#FF6600″ size=”15″ maxlength=”30″ />
<br>
<br>
Yahoo Address:
<input type=”text”name=”yahoo” style=”background-color: #444444; color:#FF6600″ size=”15″ maxlength=”30″ />
<br>
<br>
E-Mail Address:
<input type=”text” name=”email” style=”background-color: #444444; color:#FF6600″ size=”15″ maxlength=”30″ />
<br>
<br>
Postal Code:
<input type=”text” name=”postalc” style=”background-color: #444444; color:#FF6600″ size=”15″ maxlength=”5″ />
<br>
<br>
</font>
<input type=”submit” name=”submit” value=”Upload Data” />
<input type=”reset” name=”reset” value=”Reset all Fields” />

</body>
</html>
[/code]

I get an error:

Parse error: syntax error, unexpected T_LNUMBER in /home/opssrv/public_html/ops_test/ops_mem_add.php on line 5

What seems to be the problem?

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@NogDogAug 30.2008 — You did not close the quote on the preceding line.
×

Success!

Help @cybercom spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.22,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...