LolaTheriot[PHP]Sending MySQL data.

<?Php
$db_host = "1.3.3.7"; // mySQL database host
$db_user = "dbplz"; // mySQL database user
$db_password = "rofl"; // mySQL database password
$db_name = "dbplz"; // the name of your mySQL database

//connect to our database.
  mysql_connect($db_host,$db_user,$db_password) or die(mysql_error());
// Select the database.
  mysql_select_db($db_name) or die(mysql_error());
//Define the data as $query
$query = "INSERT INTO tablename (row1, row2, row3, row4)
VALUES ('$variable1','$variable2','$variable3','$variable4')";
  mysql_query($query);
  mysql_close();

// it's almost always imperative to strip tags or the data usually doesn't send properly.
$variable = strip_tags($_POST['variable'], '');
//and now send the data
  mysql_query($query);
  mysql_close();
?>

http://www.all1martpro.com

http://www.all1sourcetech.com

Tags: , , , ,