Hi all,
I've got a big problem with uploading 2 a database!
I've got a script that's ok for php 4.2 so that can not b the problem:
What i've got til now is:
A form;
<form method="post" action="contact.php">
name: <input type="text" name="name" size="30"><br>
tel: <input type="text" name="tel" size="30"><br>
room: <input type="text" name="room" size="30"><br>
email: <input type="text" name="email" size="30"><br>
function: <input type="text" name="function" size="30"><br>
<input type="submit" value="invoegen">
</form>
and a php code
<?php
include("connect.php");
if (empty($post)){
echo("go back to<a href=\"form.php\"> form </a> ");
exit();
}else{
$query="insert into contact (name, email, tel, function, room) ";
$query .= "values ('";
$query .= $post["name"] ."', .'" ;
$query .= $post["email"] ."', .'" ;
$query .= $post["tel"] ."', .'" ;
$query .= $post["function"] ."', .'" ;
$query .= $post["room"] ."');" ;
$result = mysql_query($query) or die ("fout: ". mysql_error());
}
?>
<html>
<head>
<title>Untitled</title>
</head>
<body>
<?php
echo(" query:<br> $query</b><hr>\n");
echo(" name: <b>". $post["name"] . "</b><br>");
echo(" function: <b>". $post["function"] . "</b><br>");
?>
</body>
</html>
The only thing I'm getting to see is:
go back to form and without putting the data into the database
has anybody please got an idea, i really need a good working script
(it is possible uploading from a localhost right?)
Greetz Rich