Quote:
Originally Posted by lavitra
PHP Code:
<form action="submit.php" method="POST">
<div>
<input type="text" name="firstname" size="31" />
<input type="text" name="lastname" size="31" />
<input type="text" name="email" size="31" />
<input type="text" name="shit" size="31" />
<input type="submit" value="Search" />
</div> </form>
then in your submit.php
<?php
if (isset($firstname) && isset($shit) && .... )){
$firstname = mysql_escape_string(trim($_POST['firstname']));
$shit = mysql_escape_string(trim($_POST['shit']));
..
..
$con = mysql_connect("localhost","id","pass");
if (!$con) { die('Could not connect: ' . mysql_error()); }
mysql_select_db("databasename", $con);
//INSERT ROW
$insertrow = "INSERT INTO 'databasename' (`ID` ,`text')
VALUES ('', '$title');";
mysql_query($insertrow) or die(mysql_error());
}
?>
anyways this is really half assed. theres other ways of doing it.
good luck.
|
Thanks i'll give it a shot a bit later
Quote:
Originally Posted by fris
|
That looks very useful. thanks fris
