I'm trying to write a simple script to submit a name and email into a table titled 'name.'
I'm getting this error:
Parse error: syntax error, unexpected T_STRING in home/media224/public_html/name.php on line 3
Here are the files I'm using:
name.html
<HTML>
<BODY>
<h2><font color="blue">Enter Player Name</font></h2>
<font size="2">
<i>To begin the game, please enter all fields below.</i></font><br>
<hr>
<form method="post" action="name.php">
<br>
Name <input type="text" name="name"><br>
Email <input type="text" name="email"><br>
<br>
<input type="submit" value="Submit Name">
<br>
</form>
</BODY>
</HTML>
name.php - x's are my host, username, and password
<?php
$link = mysql_connect(“xxxxx”, “xxxxx”, “xxxxx”) or die(“connect
error:”.mysql_error());
Print “successfully connected.\n”;
$db = “xxxxx”;
mysql_select_db($db, $link) or die(“select DB error:”.mysql_error());
$name = $_REQUEST['name'];
$email = $_REQUEST['email'];
$result = mysql_query(“INSERT INTO name VALUES ('$name','$email')”);
print “<br><br>One record has been entered into name table<br>”;
mysql_close($link);
?>
TIA