Ask a Question related to Coldfusion Database Access, Design and Development.
-
Student_bob #1
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
-
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... -
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... -
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... -
[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,... -
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... -
paross1 #2
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



Reply With Quote

