Přidal waror dne 13-02-2011 00:49
#1
Zdravim stahl sem si Formular_system v 0.1.Pridal sem si otazku(pole).A ji chci smazat a nejde. pise mi to chybu.
Warning: mysqli_connect(): (HY000/2005): Unknown MySQL server host 'sql3.endora.cz:3308' (1) in /home/users/waror111/team-friends.4fan.cz/web/infusions/formular_system/delete.php on line 10
zde prikladam delete.php
PHP
<?php
require_once "../../maincore.php";
require_once "../../config.php";
require_once THEMES . "templates/admin_header.php";
include "menu.php";
if (! iADMIN)
redirect ( BASEDIR . "index.php" );
openside("Delete admin");
echo "<br><form method='post' action='".$_SERVER['PHP_SELF']."'>";
$dbc = mysqli_connect(''.$db_host.'', ''.$db_user.'', ''.$db_pass.'', ''.$db_name.'')
or die(mysql_error());
if (isset($_POST['submit'])) {
foreach ($_POST['todelete'] as $delete_id) {
$query = "DELETE FROM fusion_formular_pole WHERE pole = '$delete_id'";
echo $query;
mysqli_query($dbc, $query)
or die(mysql_error());}
echo "<span style='padding-left: 5px'>Smazat pole</span><br />";}
$query = "SELECT * FROM fusion_formular_pole";
$result = mysqli_query($dbc, $query);
while ($row = mysqli_fetch_array($result)) {
echo '<input type="checkbox" value="' . $row['pole'] . '" name="todelete[]" />';
echo $row['pole'] ;
echo '<br />'; }
echo "<input type='submit' name='submit' class='button' value='Odstranit označené' /></form>";
closeside();
require_once THEMES . "templates/footer.php";
mysqli_close($dbc);
?>
-
-
-
Prosim o pomoc dekuji