INSERT virker ikke!
Hej,er der et klogt hoved som kan se hvorfor denne insert ikke skriver til min tabel?
Den returnere heller ikke fejl!
kode:
<?php
$HTTP_GET_VARS = $_GET;
$HTTP_POST_VARS = $_POST;
$HTTP_FILES_VARS = $_FILES;
$HTTP_SERVER_VARS = $_SERVER;
extract($_GET);
extract($_POST);
extract($_FILES);
extract($_SERVER);
if (!empty($_FILES['upfile']['name'])) {
if(is_uploaded_file($HTTP_POST_FILES['upfile']['tmp_name'])) {
$dist = $HTTP_SERVER_VARS['DOCUMENT_ROOT']."/03/pliste/img/";
$billed = $HTTP_POST_FILES['upfile']['name'];
$navn = $_POST['navn'];
$initialer = $_POST['initialer'];
$loennummer = $_POST['loennummer'];
$stilling = $_POST['stilling'];
$basis = $_POST['basis'];
$emailwork = $_POST['emailwork'];
$emailprivat = $_POST['emailprivat'];
$foedselsdag = $_POST['foedselsdag'];
$adresse = $_POST['adresse'];
$tlf = $_POST['tlf'];
$mobil = $_POST['mobil'];
mysql_connect("x","x","x");
mysql_select_db("x");
mysql_query("INSERT INTO pliste (navn, initialer, loennummer, stilling, basis, emailwork, emailprivat, foedselsdag, adresse, tlf, mobil, billed) VALUES ('$navn', '$initialer', '$loennummer', '$stilling', '$basis', '$emailwork', '$emailprivat', '$foedselsdag', '$adresse', '$tlf', '$mobil', '$billed')") or die(mysql_error());
move_uploaded_file($HTTP_POST_FILES['upfile']['tmp_name'], $dist.$HTTP_POST_FILES['upfile']['name']);
$besked = "$billede er blevet uploadet med succes!";
}else{
$besked = "Sorry, men upload skete IKKE!";
}
}else{
$besked = "Tilføj ny person:";
}
?>
<html><head><title>ny</title>
</head>
<body>
<form enctype="multipart/form-data" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
<center>
<table><tr>
<td><?php echo $besked; ?><br>
<p>navn:<br>
<input name="navn" type="text" id="navn">
<br>
initialer:<br>
<input name="initialer" type="text" id="initialer">
<br>
loennummer:<br>
<input name="loennummer" type="text" id="loennummer">
<br>
stilling:<br>
<input name="stilling" type="text" id="stilling">
<br>
basis:<br>
<input name="basis" type="text" id="basis">
<br>
emailwork:<br>
<input name="emailwork" type="text" id="emailwork">
<br>
emailprivat :<br>
<input name="emailprivat" type="text" id="emailprivat">
<br>
foedselsdag:<br>
<input name="foedselsdag" type="text" id="foedselsdag">
<br>
adresse :<br>
<textarea name="adresse" cols="25" rows="7" id="adresse"></textarea>
<br>
tlf :<br>
<input name="tlf" type="text" id="tlf">
<br>
mobil :<br>
<input name="mobil" type="text" id="mobil">
<br>
billed :<br>
<input type="file" name="billed" id="billed">
<br>
<input type="hidden" name="Saved" value="true">
<input type="submit" name="Submit" value="Submit">
<input type="reset" name="Reset" value="Reset">
</tr></table>
</center>
</form>
</body></html>