<?php
// include the database
include 'db.php';
$query = 'INSERT INTO `table_name` (`ownerID`, `favorites`) VALUES ';
// This foreach we will pretend that we passed an array of
// checkboxs, which could be our favorite food for this example.
foreach($_POST['favorites'] as $box){
$b = mysql_real_escape_string($box); // Safe query string
$query .= "('{$_SESSION['id']}', '$b'),";
}
// Remove the trailing comma at the end.
$query = trim($query,',');
// Perform the query
mysql_query($query);
?>
تطوير،برمجة،حل،مشكلة،php،ccs،html،هكات،سكربتات،شروحات،بالصور،بالفيديو،دروس،دورات،حماية
الأحد، 31 مارس 2013
[php] كود ادخال كم كبير من البيانات بالقاعدة باستعلام واحد فقط
الاشتراك في:
تعليقات الرسالة (Atom)
ليست هناك تعليقات:
إرسال تعليق