Help with database deletion

Ask a Question related to Coldfusion Database Access, Design and Development.

  1. #1

    Default Help with database deletion

    we have the below 3 pages.
    delete_roster1, 2, 3.cfm

    from delete1 we have the user input two id fields, they are assigned to 2
    different variables. On delete 2 there are matched up to make sure user
    entered proper id.

    Delete_roster1.cfm looks like this:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

    <html>
    <head>
    <title>Delete Roster</title>
    </head>

    <body bgcolor="ffffff">
    <form action="delete_roster2.cfm" method="get">
    <font face="Trebuchet MS, Arial, Helvetica" color="330099">
    <table align="center" width="400">
    <caption>
    <h3><font color="ff7300">Delete Roster - Site Admin Tool</h3><hr>
    <h3><font color="ff7300">Delete a Member</h3>
    </caption>
    <tr><td colspan="2"><hr></td></tr>
    <tr>
    <td>Step 1.</td>
    <td>Enter P00 Number Here: <input type="text" name="P_Num" value="P00"></td>
    </tr>
    <tr><td colspan="2"><hr></td></tr>
    <tr>
    <td>Step 2.</td>
    <td>Enter P00 Number Again: <input type="text" name="P_Num2" value="P00"></td>
    </tr>
    <tr><td colspan="2"><hr></td></tr>
    <tr>
    <td>Step 3.</td>
    <td><input type="submit" value="Continue >>>"></td>
    </tr>
    <tr><td colspan="2"><hr></td></tr>
    <tr><td colspan="2">Warning: Deleted records are lost forever.</td></tr>

    </table>
    </font>
    <hr align="center" width="400">
    </form>
    </body>
    </html>


    Delete_roster2.cfm looks like this:

    <html>
    <head>
    <title>Delete Member Screen 2</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>

    <body>
    <cfif FORM.P_Num NEQ FORM.P_Num2>
    <font color="ff7300">Team Member verification failed. Go <a
    href="delete_roster1.cfm">back</a> and try again.
    <cfelse>
    <form action="delete_roster3.cfm" method="post">
    <cfquery datasource="Trackclub" name="getInfo">
    Select * From roster
    Where P_Num = '#P_Num#'
    </cfquery>
    <cfloop query="getInfo">
    <cfoutput>
    <table align="center" width="400">
    <tr><td colspan="2"><hr></td></tr>
    <tr>
    <td> Last Name: </td>
    <td> #LName# </td>
    </tr>
    <tr><td colspan="2"><hr></td></tr>
    <tr>
    <td> First Name: </td>
    <td> #FName# </td>
    </tr>
    <tr><td colspan="2"><hr></td></tr>
    <tr>
    <td> P00 Number: </td>
    <td> #P_Num# </td>
    </tr>
    <tr><td colspan="2"><hr></td></tr>
    <tr>
    <td> Date of Birth: </td>
    <td> #dob# </td>
    </tr>
    <tr><td colspan="2"><hr></td></tr>
    <tr>
    <td> Class: </td>
    <td> #class# </td>
    </tr>
    <tr><td colspan="2"><hr></td></tr>
    <tr>
    <td> Sex: </td>
    <td> #sex# </td>
    </tr>
    <tr><td colspan="2"><hr></td></tr>
    <tr>
    <td> School Phone Number: </td>
    <td> #School_Phone# </td>
    </tr>
    <tr><td colspan="2"><hr></td></tr>
    <tr>
    <td> School Street Address: </td>
    <td> #school_street# </td>
    </tr><tr><td colspan="2"><hr></td></tr>
    <tr>
    <td> School City: </td>
    <td> #School_city# </td>
    </tr><tr><td colspan="2"><hr></td></tr>
    <tr>
    <td> School State: </td>
    <td> #School_state# </td>
    </tr><tr><td colspan="2"><hr></td></tr>
    <tr>
    <td> School Zip Code: </td>
    <td> #School_zip# </td>
    </tr><tr><td colspan="2"><hr></td></tr>
    <tr>
    <td> BG Email Address: </td>
    <td> #BG_Email# </td>
    </tr><tr><td colspan="2"><hr></td></tr>
    <tr>
    <td> Home Phone Number: </td>
    <td> #home_Phone# </td>
    </tr><tr><td colspan="2"><hr></td></tr>
    <tr>
    <td> Home Street Address: </td>
    <td> #home_street# </td>
    </tr><tr><td colspan="2"><hr></td></tr>
    <tr>
    <td> Home Town: </td>
    <td> #home_city# </td>
    </tr><tr><td colspan="2"><hr></td></tr>
    <tr>
    <td> Home State: </td>
    <td> #Home_state# </td>
    </tr><tr><td colspan="2"><hr></td></tr>
    <tr>
    <td> Home Zip Code: </td>
    <td> #home_zip# </td>
    </tr><tr><td colspan="2"><hr></td></tr>
    <tr>
    <td> Cell Phone Number: </td>
    <td> #Cell_phone# </td>
    </tr><tr><td colspan="2"><hr></td></tr>
    <tr>
    <td> Height: </td>
    <td> #height# </td>
    </tr><tr><td colspan="2"><hr></td></tr>
    <tr>
    <td> Weight: </td>
    <td> #Weight# </td>
    </tr><tr><td colspan="2"><hr></td></tr>
    <tr>
    <td> High School: </td>
    <td> #high_school# </td>
    </tr>
    <tr><td colspan="2"><hr></td></tr>
    <tr>
    <td> Events: </td>
    <td> #events# </td>
    </tr>
    <tr><td colspan="2"><hr></td></tr>
    <tr>
    <td><input type="submit" value="Yes Delete >>>"></td>
    </tr>
    <tr><td colspan="2"><hr></td></tr>
    <tr>
    <td> Wrong Information -- Go <a href="delete_roster1.cfm"> BACK</a>. </td>
    </tr>
    </table>
    </cfoutput>
    </cfloop>
    </form>
    </cfif>
    </body>
    </html>

    delete_roster3.cfm looks like this:

    <html>
    <head>
    <title>Delete Team Member Screen 3</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>

    <body>
    <cfquery datasource="Trackclub">
    DELETE FROM roster WHERE P_Num = '#FORM.P_Num#'
    </cfquery>
    <font color="ff7300">Data deleted successfully. Click <a
    href="BGTrack_admin.cfm">here</a> to return to the Site Admin Tool.
    </cfif>
    </body>
    </html>



    Problem:

    We are receiving the following error message:

    Error Diagnostic Information

    An error occurred while evaluating the expression:


    FORM.P_Num NEQ FORM.P_Num2



    Error near line 8, column 17.

    --------------------------------------------------------------------------------

    Error resolving parameter FORM.P_NUM


    The specified form field cannot be found. This problem is very likely due to
    the fact that you have misspelled the form field name.



    The error occurred while processing an element with a general identifier of
    (CFIF), occupying document position (8:1) to (8:33).




    any help you could provide would be greatly appreciated!!! Thank you.

    Student_bob Guest

  2. Similar Questions and Discussions

    1. PREVENTING CSS DELETION
      Hello, There is an option at the bottom of the CSS style list in Contribute, to remane or delete CSS styles. How do I configure Contribute to...
    2. More help with DB deletion
      3 pages. Input of primary keys on page 1. checking to make sure primary keys match, and display data to be deleted on page 2. Deletion of data...
    3. Bookmarks deletion
      using Adobe Acrobat 5.0 on windows pc I am new to creating pdfs however, I created a 39 page pdf with several bookmarks. I need to update this...
    4. [PHP] File upload and deletion
      Steven Murphy <mailto:list@pfohlsolutions.com> on Thursday, August 21, 2003 1:40 PM said: Are you wanting me to download this file, unzip it,...
    5. Deletion problems
      I am having two similar issues, and if I can figure one out, I might be able to figure out the other. a while back, I had a file that I couldn't...
  3. #2

    Default Re: Help with database deletion

    Shouldn't your method="post" instead of "get" on your Delete_roster1.cfm page?

    <form action="delete_roster2.cfm" method="post">

    Phil
    paross1 Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139