Jump to content
php.lv forumi

kapēc nedzēš?


ziedinjsh

Recommended Posts

if (isset($_GET['del_report'])) {
$data = mysql_fetch_array(mysql_query("SELECT * FROM report WHERE id='".$_GET['del_report']."' LIMIT 1"));
$sql = "DELETE FROM report WHERE id ='".$data['id']."'";
   $result = mysql_query($sql);

}

 

<a href='index.php?id=report&r=del&del_report=".$data['id']."'>Delete</a>

Edited by ziedinjsh
Link to comment
Share on other sites

Murgs! Taču palasi, ko katra funkcija dara un vispār, kāpēc tiesi viņas tiek izmantotas un tāda secībā.

 

if( isSet( $_GET['id'] ) ) {

$id = $_GET['id'];


mysql_query("

	DELETE FROM `reports`
	WHERE `id` = '{$id}'
	LIMIT 1

") or exit( mysql_error() );

}

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...