I am trying create a form that submits data into a MySQL table. A gutted version of the code is shown below. It works great when I replace the red line with:
[COLOR=”Red”]$query = “INSERT INTO top VALUES ($score, ‘Bob’)”;
so I think there is some problem recognizing the variable $name which is sent from the form as a string compatible with the MySQL table type tinytext
<html>
<head>
<?php
//data String
$name = $_POST[“name”];
$score = (int)$
?>
</head>
<body>
<?php
—Code Removed—
[COLOR=”Red”]$query = “INSERT INTO top VALUES ($score, $name)”;
mysql_query($query);
?>
</body>
</html>
Thanks in Advance,
Alex