Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: delete mygtukas

Parašė JaWa· 2010 Spa. 18 14:10:18
#1

Sveiki. Kaip padaryti kad paspaudus mygtuka issitrintu tam tikras id ?

echo "<td>
<form name=deleteWish action=".$PHP_SELF."?nuo=$nuo method=POST>
<input type=hidden name=delete value=".$data['download_id']."/>
<input type=submit name=delete value=Delete>";
if (isset($_POST['delete'])) {
dbquery("delete from ".$db_prefix."downloads where download_id='$id'");
$result = mysql_query($dbquery);
}
echo "</form>
</td>\n";


pvz. cia bandau daryti :p


Redagavo JaWa· 2010 Spa. 18 14:10:54

Parašė Žmogus· 2012 Lie. 9 15:07:46
#2

<form name=deleteWish action=trinimas.php?nuo=$nuo method=POST>

Parašė JaWa· 2012 Lie. 9 16:07:55
#3

nee, kazkas ne taip :/ . vistiek neveikia ..

Parašė Žmogus· 2012 Lie. 9 18:07:53
#4

O kas būna? kai paspaudi?

Parašė avice· 2012 Lie. 9 19:07:52
#5

labai jau nepatogiai padarytas tas tavo kodas...
Bandyk:

echo "<td>
<form name='deleteWish' action='".$PHP_SELF."?nuo=$nuo' method='POST'>
<input type='hidden' name='id' value='".$data['download_id']."'/>
<input type='submit' name='delete' value='Delete'>";
if (isset($_POST['delete'])) {
$test = mysql_query("delete from ".$db_prefix."downloads where download_id='".$_POST['id']."'") or die(mysql_error());
echo ($test ? "<script>alert('Istrinta');</script>" : "<script>alert('klaida');</script>";
}
echo "</form>
</td>\n";

Parašė JaWa· 2012 Lie. 10 09:07:22
#6

Parse error: syntax error, unexpected ';' in *******/administration/zemelapiai_admin.php on line 44

kazkas blogai su sita eilute


echo ($test ? "<script>alert('Istrinta');</script>" : "<script>alert('klaida');</script>";

Parašė Žmogus· 2012 Lie. 10 10:07:35
#7


echo "<td>
 
<form name='deleteWish' action='trinimas.php?nuo=$nuo' method='POST'>
 
<input type='hidden' name='id' value='".$data['download_id']."'/>
 
<input type='submit' name='delete' value='Delete'>";
 
if (isset($_POST['delete'])) {
 
mysql_query("delete from ".$db_prefix."downloads where download_id='".$_POST['id']."'") or die(mysql_error());
 
//echo ($test ? "<script>alert('Istrinta');</script>" : "<script>alert('klaida');</script>";
 
}
 
echo "</form>
 
</td>\n";

Redagavo Žmogus· 2012 Lie. 10 10:07:24

Parašė avice· 2012 Lie. 10 16:07:07
#8

JaWa parašė:
Parse error: syntax error, unexpected ';' in *******/administration/zemelapiai_admin.php on line 44

kazkas blogai su sita eilute


echo ($test ? "<script>alert('Istrinta');</script>" : "<script>alert('klaida');</script>";


Taigi matosi jog pries [ ; ] truksta [ ) ]


echo ($test ? "<script>alert('Istrinta');</script>" : "<script>alert('klaida');</script>");
[/c]