View Single Post
Old 05-22-2009, 08:26 AM  
Si
Such Fun!
 
Industry Role:
Join Date: Feb 2008
Posts: 13,900
Quote:
Originally Posted by lavitra View Post
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 View Post
That looks very useful. thanks fris
Si is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote