Hi,

I have a review form which is supposed to submit the request to a review
action file to call a single unapproved joke from a joke database for
approval or deletion.  Instead, the following problems occur:

1.  all unapproved jokes appear, except those submitted to the database
after the form and action file were created.
2.  jokes submitted to the database after the form and action file were
created never appear.

I'd appreciate help with the code so that the following occur:

1.  only one joke appears for review at any one time.
2.  all unapproved jokes can be accessed for review.

The review form's code is:

<CFQUERY DATASOURCE="Jokes" NAME="Review">
SELECT
    JokeID,
    JokeTitle,
       Joke,
    JokeDate,
    FirstName,
    LastName,
    EmailAddress,
    Approved
FROM WordJokes
WHERE Approved=0
ORDER BY JokeTitle
</CFQUERY>

<HTML>
<HEAD>
 <TITLE>Joke Review Form</TITLE>
</HEAD>

<BODY TEXT="Blue" BACKGROUND="clouds2.jpg">

<CFIF ISDEFINED("Session.Auth") IS NOT TRUE>
 <CFLOCATION URL="login.cfm">
<CFELSE>

<H1 ALIGN="CENTER">Review Jokes Form</H1>

<FORM ACTION="reviewaction.cfm" METHOD="POST">

Please select joke JokeTitle from the contents
of the select boxes below. Please note you may only make <B>one</B>
selection
for review at any one time.<P>

Total number of jokes in database is
<CFOUTPUT>#Review.recordcount#</CFOUTPUT><P>

<SELECT MULTIPLE NAME="a" SIZE="5">
<CFOUTPUT QUERY="Review">
<OPTION VALUE="JokeID">#JokeTitle#</OPTION>
</CFOUTPUT>
</SELECT><P>

<INPUT TYPE="submit" VALUE="Submit choice(s)">
<INPUT TYPE="reset" VALUE="Clear"><P>

</FORM>

</CFIF>

</BODY>
</HTML>



The review action file's code is unfinished, as I haven't yet coded the
approve or delete options but only the code to display the joke.  It is:

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

<HTML>
<HEAD>
 <TITLE>Review Jokes Action</TITLE>
</HEAD>

<BODY TEXT="Blue" BACKGROUND="clouds2.jpg">

<H1 ALIGN="CENTER">This Form Approves or Deletes Submitted Jokes</H1>

<CFLOOP INDEX="count2" LIST="#form.a#">
<CFQUERY DATASOURCE="Jokes" NAME="JokeData2">
SELECT
       JokeTitle,
       Joke,
    JokeDate,
    FirstName,
    LastName,
    EmailAddress,
    Approved
FROM WordJokes
WHERE JokeId=#count2#
ORDER BY JokeTitle
</CFQUERY>
<CFOUTPUT QUERY="JokeData2">#Joke#</CFOUTPUT><BR>
</CFLOOP>

<PRE>

</PRE>




<P>



<INPUT TYPE="submit" VALUE="Send">
<INPUT TYPE="reset" VALUE="Clear"><P>


<SCRIPT TYPE="text/javascript" LANGUAGE="JavaScript">

<!--//

d=new Date();
document.write("The date and time are: "+ d.toLocaleString());

file://-->

</SCRIPT>

</BODY>

</HTML>

I'd appreciate any assistance with this.

Hubert

---
Hubert Earl

ICQ#: 16199853
AIM: hubertfme

See pictures of items in my Jamaican Art, Craft & More Store Online Sale on
my "Me" page on eBay (this tells you a little about myself, including a
photo), and there's a link to the auctions themselves:
http://members.ebay.com/aboutme/hearl1/

See pictures of all items I have:
http://www.angelfire.com/ny/hearl/link_page_on_angelfire.html




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to