",$url); /*$rands = array(); foreach ($sites as $key => $value ) { $RAND = rand(1,10000); $rands[]=$RAND; } */ //$all = array_combine($rands,$sites); foreach ($sites as $value ) { $value = trim($value); $query = "INSERT INTO `links` (`id` ,`url`,`date`) values (NULL , '$value','$date')"; $row = mysql_query($query); $links[] = mysql_insert_id(); $smarty->assign ("links", $links); $smarty->assign ("done", 1); } }else{ $smarty->assign ("done", 0); } $templatefile = 'multiadd'; require 'display.php'; ?>