By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,890 Members | 1,048 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,890 IT Pros & Developers. It's quick & easy.

I cant delete my data

P: 22
Please help me,
I try to get global variables but failed. I cant delete my data
my code

[PHP][<a href=\"delete.php?del=$row[date]\">Delete</a>][/PHP]

in delete.php
i wrote

[PHP]<?php
include"../connect.php";
$del=$_POST["del"];
$sql_del=mysql_query("delete from tbldataflt where date='$del'",$koneksi)or die(mysql_error());
include"input_dep.php";
?>[/PHP]
Mar 3 '07 #1
Share this Question
Share on Google+
2 Replies


P: 51
Try this.

[PHP]
<?
echo "<a href=\"delete.php?del=".$row["date"]."\">Delete</a>";
?>
[/PHP]

and next time send the whole code and let us help you more perfectly.

best regards,
Mainul
Mar 4 '07 #2

P: 22
my code

[PHP]$cek_dup=mysql_query("select count(*) as total from tbldataflt where date='$date' and fltdep='$fltdep'",$conecti)or die( mysql_error());
$sql_dup=mysql_fetch_array($cek_dup);
if($sql_dup["total"]>"1"){
$no=1;
$print_dup=mysql_query("select * from tbldataflt where date='$date' and fltdep='$fltdep'",$connect)or die( mysql_error());
while($printdata_dup=mysql_fetch_array($print_dup) ){
echo"<tr><td width=\"30%\"><font size=\"2\">$no</font></td>
<td width=\"100%\"><font size=\"2\">$printdata_dup[tgl]</font></td>
<td width=\"100%\"><font size=\"2\">$printdata_dup[fltdep]</font></td>
<td width=\"100%\"><font size=\"2\">[<a href=\"delete.php?del=$printdata_dup[date]\">Delete</a>]</font></td>
</tr>";
$no++; [/PHP]

i cant get the variable for del in delete.php

[PHP]<?php
include"../koneksi.php";
$del=$HTTP_POST_VARS["del"];
$sql_del=mysql_query("delete from tbldataflt where date='$del'",$connect)or die(mysql_error());
include"input_dep.php";
?>[/PHP]

anyone can help me
Mar 4 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.