hey all i am trying to figure out how to place a large ammount of data into a MySQL query using a php script. i need to know how to take this
$sql="INSERT INTO table ('row') VALUES (,,,,,,,,,,)"
and make it generate a numeric variable from a $_POST form.
heres what i am using:
<?
$con = mysql_connect("host","user","pass");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("db", $con);
$sql="SELECT row1, row2 FROM account";
$result=mysql_query($sql);
$options="";
while ($row=mysql_fetch_array($result)) {
$id=$row["row1"];
$username=$row["row2"];
$options.="<OPTION VALUE=\"$row1\">".$row2;
}
?>
the problem i am having is that in the $_POST[text] is showing up in part of the row and it needs to be a number....
how can i fix this?