SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Nov 2013
    1 Post(s)
    0 Thread(s)

    Problems with delete in MYSQL


    I am new to the list and I would like to get some advice on SQL coding from time to time. I am currently working my way through Kevin Yank's excellent tutorial and have hit a snag.

    The control file, "index.php" tries to detect the "deletejoke" flag coming from the jokes.html.php file with the line:

    if (isset($_get['deletejoke']))


    but fails to detect it.

    The jokes.html.php file sets up the "deletejoke" flag when the user presses the delete button on a particular joke with:

    <form action="?deletejoke" method="post">

    I have tried various simple tests like displaying a simple message from the error.html.php file if the "deletejoke" flag is detected, but nothing happens. I think this means that the "deletejoke" flag is not being passed from jokes.html.php to index.php. I cannot find any reason for this since the other flags are all passing through and I am able to list the jokes and add new ones at will.

    Any ideas?

    All the best,


    <snip />
    Last edited by SpacePhoenix; Dec 3, 2013 at 00:48. Reason: removed personal information

  2. #2
    Avid Logophile silver trophy
    ParkinT's Avatar
    Join Date
    May 2006
    Central Florida
    192 Post(s)
    4 Thread(s)
    Welcome @comanna ; and I am pleased you have chosen to join us and ask for some guidance.
    Based on your brief description I believe the problem is simply that
    if (isset($_get['deletejoke']))
    should be
    if (isset($_GET['deletejoke']))
    Don't be yourself. Be someone a little nicer. -Mignon McLaughlin, journalist and author (1913-1983)

    Git is for EVERYONE
    Literally, the best app for readers.
    Make Your P@ssw0rd Secure
    Leveraging SubDomains


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts