hejsa...
nogle der kan hjælpe??
får fejlen:
You have an error in your SQL syntax. Check the manual that
corresponds to your MySQL server version for the right syntax to
use near '' at line 1
min kode er:
<html>
<head>
<title>Upload File To MySQL Database</title>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
<style type="text/css">
<!--
..box {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
border: 1px solid #000000;
}
-->
</style>
</head>
<body>
<?
if(isset($_POST['upload']))
{
$felta = $_POST['felt1'];
$feltb = $_POST['felt2'];
$feltc = $_POST['felt3'];
$feltd = $_POST['felt4'];
$felte = $_POST['felt5'];
$feltf = $_POST['felt6'];
$feltg = $_POST['felt7'];
$felth = $_POST['felt8'];
$felti = $_POST['felt9'];
$feltj = $_POST['felt10'];
$felteta = '<SCRIPT
language="JavaScript">alert('.$felta.')</SCRIPT>';
$feltetb = '<SCRIPT
language="JavaScript">alert("$feltb")</SCRIPT>';
$feltetc = '<SCRIPT
language="JavaScript">alert("$feltc")</SCRIPT>';
$feltetd = '<SCRIPT
language="JavaScript">alert("$feltd")</SCRIPT>';
$feltete = '<SCRIPT
language="JavaScript">alert("$felte")</SCRIPT>';
$feltetf = '<SCRIPT
language="JavaScript">alert("$feltf")</SCRIPT>';
$feltetg = '<SCRIPT
language="JavaScript">alert("$feltg")</SCRIPT>';
$felteth = '<SCRIPT
language="JavaScript">alert("$felth")</SCRIPT>';
$felteti = '<SCRIPT
language="JavaScript">alert("$felti")</SCRIPT>';
$feltetj = '<SCRIPT
language="JavaScript">alert("$feltj")</SCRIPT>';
$feltabcdefghij = "'$felteta $feltetb $feltetc $feltetd $feltete
$feltetf $feltetg $felteth $felteti $feltetj'";
include 'config.php';
include 'opendb.php';
$query = "INSERT INTO test (felt ) ";
"VALUE ('$feltabcdefghij')";
mysql_query($query) or die (mysql_error());
include 'closedb.php';
echo "<br>tingene er nu uploadede!<br>";
}
?>
<form action="" method="post" name="form">
<table width="350" border="0" cellpadding="1" cellspacing="1"
class="box">
<tr>
<td width="246"><input type="text"
name="felt1"><p></p><input type="text" name="felt2"><input
type="text" name="felt3"><input type="text" name="felt4"><input
type="text" name="felt5"><input type="text" name="felt6"><input
type="text" name="felt7"><input type="text" name="felt8"><input
type="text" name="felt9"><input type="text" name="felt10=>
</td>
<td width="80"><input name="upload" type="submit"
class="box" id="upload" value=" Upload "></td>
</tr>
</table>
</form>
</body>
</html>
Ralle
--
Vil du lære at kode HTML, XHTML, CSS, SSI, ASP eller ASP.NET?
- Pædagogiske tutorials på dansk
- Kom godt i gang med koderne
KLIK HER! =>
http://www.html.dk/tutorials