Please help, younger brother. I have pasted the code and do not need to download the file now.

Source: Internet
Author: User
Please help me. I have pasted the code and do not need to download the file now. This post was last edited by abkey1 from 2014-06-0110:a. php & nbsp; includes a check box function & nbsp; display_user_urls ($ url_array) {& nbsp; & nbs. please help me paste the code, you do not need to download the file now.

This post was last edited by abkey1 at 10:13:30 on

A. php contains a check box for deleting selected bookmarks.

Function display_user_urls ($ url_array)
{
// Display the table of URLs

// Set global variable, so we can test later if this is on the page
Global $ bm_table;
$ Bm_table = true;
?>



}


After clicking the delete check box above, you need to click delete bookmarks below
// Only offer the delete option if bookmark table is on this page
Global $ bm_table;
If ($ bm_table = true)
Echo "Delete BM | ";
Else
Echo "Delete BM | ";
?>


The delete function of delete_bms.php is as follows:
Require_once ('bookmark _ fns. php ');
Session_start ();

// Create short variable names
$ Del_me = $ HTTP_GET_VARS ['Del _ me'];
$ Valid_user = $ HTTP_GET_VARS ['valid _ user'];

Do_html_header ('ing ing bookmark ');
Check_valid_user ();
If (! Filled_out ($ HTTP_GET_VARS ))
{
Echo 'You have not chosen any bookmarks to delete.
Please try again .';
Display_user_menu ();
Do_html_footer ();
Exit;
}
Else
{
If (count ($ del_me)> 0)
{
Foreach ($ del_me as $ url)
{
If (delete_bm ($ valid_user, $ url ))
Echo 'Ed Ed '.html specialchars ($ url ).'.
';
Else
Echo 'could not delete '.html specialchars ($ url ).'.
';
}
}
Else
Echo 'no bookmarks selected for deletion ';
}
// Get the bookmarks this user has saved
If ($ url_array = get_user_urls ($ valid_user ))
Display_user_urls ($ url_array );

Display_user_menu ();
Do_html_footer ();
?>



The code for the delete_bm function is as follows:

Function delete_bm ($ user, $ url)
{
// Delete one URL from the database
$ Conn = db_connect (); // This is already included in another php file. it is normal to connect to the database.
// Delete the bookmark
If (! $ Conn-> query ("delete from bookmark
Where username = '$ user' and bm_url =' $ url '"))
Throw new Exception ('bookmark cocould not be deleted ');

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.