mhh hab hier nen fhler , den ich nich rausbekomme, dieses script soll, die db leeren oder halt die datensätze ändern , jedoch bekomme ich den parse error nich raus
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in E:\xampp\xampp\htdocs\projects\shoutbox\admin.php on line 37
(line37 = $query = "Delete FROM $mysql['table']";
)
ich hoffe ihr habt ne idee ,.
######db leeren### oder #### updaten####
$mysql['handle'] = mysql_pconnect($mysql['host'], $mysql['user'], $mysql['pass']);
if($POST[hiddenaction]=='save' {
$sql = "UPDATE {$mysql['table']} SET `hp` = '".addslashes($_POST['hp'])."',
`name` = '".addslashes($_POST['name'])."'
`nachricht` = '".addslashes($_POST['nachricht'])."'";
}
elseif($_POST[hiddenaction] == 'delete' {
$mysql['handle'] = mysql_pconnect($mysql['host'], $mysql['user'], $mysql['pass']);
$select = mysql_select_db($mysql['root'],$mysql['handle']);
$query = "Delete FROM $mysql['table']";
$result= mysql_query($query,$mysql['handle']);
$return = mysql_num_rows($result);
for($i = 0;$i < mysql_num_rows($result);$i++){
$data = mysql_fetch_array($result);
}
mysql_close();
)
if (isset($_GET["submit"])){
$db = mysql_connect ($mysql['host'], $mysql['user'], $mysql['pass']);
echo mysql_error();
$select = mysql_select_db($mysql['root'],$db);
$query = "Delete FROM $mysql['table']";
$result= mysql_query($query,$db);
$ret = mysql_num_rows($result);
for($i = 0;$i < mysql_num_rows($result);$i++){
$data = mysql_fetch_array($result);
}
mysql_close();
)
OS: Windows XP
CPU: AMD Athlon XP 3200+
RAM: 512MB DDR PC3200 (Dual Channel)
Mainboard: MSI K7n2 Delta-L
HDD: 80GB WD
Graka:Radeon 9600 Pro
=>
Alekeijer Straussbuwe