<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<form method="post" action="result1.php" enctype="multipart/form-data">
<input type="file" name="form_data" size="40">
<br>
<select name="team" id="team">
<option>atlanta</option>
</select>
<p><input type="submit" name="submit" value="submit">
</form>
</body>
</html>
You see the select name="team well i want whatever they select from that drop down to be entered into the database along with this code
<?php include(config.php); ?>
<?
$fp = fopen("$form_data", "r");
$flatfile = fread($fp, filesize("$form_data"));
fclose($fp);
for ($i = 1; $i <= 10; $i++) {
$flatfile = ereg_replace(" {3}", " ", $flatfile);
}
$csv = ereg_replace(" {2}", ", ", $flatfile);
fwrite($fp, $csv);
fclose($fp);
$result = mysql_db_query('all-nba_net' ,"LOAD DATA LOCAL INFILE '$form_data' INTO TABLE stats1
FIELDS TERMINATED BY ',' LINES TERMINATED BY '\r\n'
IGNORE 5 lines
(`pos`, `no`, `name`, `pts`, `mins`, `fgm`, `fga`, `fg%`, `threepm`, `threepa`, `threep%`,
`ftm`, `fta`, `ft%`, `orebounds`, `drebounds`, `rebounds`, `blocks`, `steals`, `assist`, `to`,
`fouls`)") or die(mysql_error());
?>
this code works fine but i wanna add the team part . I want it to take the team they selected then add it to the database under the field team, table stats1