Thread: Using Word Verification On Registration Page


Permlink Replies: 24 - Pages: 2 [ 1 2 | Next ] - Last Post: Sep 6, 2007 2:16 PM Last Post By: cedwards
cedwards

Posts: 402
Registered: 10/20/98
Using Word Verification On Registration Page
Posted: May 18, 2007 8:11 AM
Click to report abuse...   Click to reply to this thread Reply
I'm using Scott's example from the Wiki to display a word verification and have a text box for the user to type it in.

So how do I access the value from the image to make sure that what they entered is correct?

Thanks,
Chad
Jes

Posts: 5,408
Registered: 06/19/04
Re: Using Word Verification On Registration Page
Posted: May 18, 2007 8:24 AM   in response to: cedwards in response to: cedwards
Click to report abuse...   Click to reply to this thread Reply
Im using Scott's example from the Wiki to display a word verification and have a text box for the >user to type it in.

Can you give a link for that? Or are you referring to this -

http://wiki.shellprompt.net/bin/view/Apex/ImageVerificationExample

In that example, you can store the value generated anywhere you like (in a table for example).

By the way, that's my example, not 'Scott's' (my surname is Scott, perhaps that's where you got confused?)
Dimitri Gielis

Posts: 1,859
Registered: 04/21/07
Re: Using Word Verification On Registration Page
Posted: May 18, 2007 8:38 AM   in response to: Jes in response to: Jes
Click to report abuse...   Click to reply to this thread Reply
By the way, that's my example, not 'Scott's' (my surname is Scott, perhaps that's where you got confused?)

For the second time today some people think something from Jes is coming from Scott ;-)
Scott is a too popular name in this forum, we have
- Scott Spendolini
- Scott Spadafore
and... John Scott

You could become confused after a while ;-)

This thread is taken into account for the weekly forum wrap-up (funny part).

Dimitri
cedwards

Posts: 402
Registered: 10/20/98
Re: Using Word Verification On Registration Page
Posted: May 18, 2007 8:47 AM   in response to: Jes in response to: Jes
Click to report abuse...   Click to reply to this thread Reply
Jes,

Yes, I was referring to the link you gave. Sorry for the confusion on the name. :)

I can certainly store it in a table. I wondered about that since it's in the pkgauth package that I'm aware of what the code is that I've created.

Thanks,
Chad
cedwards

Posts: 402
Registered: 10/20/98
Re: Using Word Verification On Registration Page
Posted: May 18, 2007 8:48 AM   in response to: Dimitri Gielis in response to: Dimitri Gielis
Click to report abuse...   Click to reply to this thread Reply
This thread is taken into account for the weekly forum wrap-up (funny part).

Wow...I've now been funny twice in one week!

And let me also add that my boss also is named Scott.

Chad
Dimitri Gielis

Posts: 1,859
Registered: 04/21/07
Re: Using Word Verification On Registration Page
Posted: May 18, 2007 8:54 AM   in response to: cedwards in response to: cedwards
Click to report abuse...   Click to reply to this thread Reply
Congratulations Chad!

I should start to look for some trophies ;-) At the end of the year a flashback with the top 3 in every category.

Dimitri
-- APEX Forum wrap-up --
@ http://dgielis.blogspot.com
Jes

Posts: 5,408
Registered: 06/19/04
Re: Using Word Verification On Registration Page
Posted: May 18, 2007 8:57 AM   in response to: Dimitri Gielis in response to: Dimitri Gielis
Click to report abuse...   Click to reply to this thread Reply
At the end of the year a flashback with the top 3 in every category.

Is that some thinly veiled Oracle database joke? Oh Dimitri...you are a geek ;)
cedwards

Posts: 402
Registered: 10/20/98
Re: Using Word Verification On Registration Page
Posted: May 18, 2007 1:59 PM   in response to: Jes in response to: Jes
Click to report abuse...   Click to reply to this thread Reply
Okay, I was looking through some of Carl's examples and saw where he showed doing a SVG Chart from an application process and decided that's what I wanted to do, but I'm having a time getting it to work.

Here's what I've done:

1) Create application level process:

DECLARE
v_random number;

begin
v_random := trunc(dbms_random.value(100000,999999));
owa_util.mime_header( ccontent_type => 'image/svg+xml', bclose_header => FALSE, ccharset => 'utf-8');
htp.p('Expires: Thu, 29 Oct 2000 17:04:19 GMT');
htp.p('Pragma: no-cache');
htp.p('Cache-Control: no-cache');
owa_util.http_header_close;
htp.p('<?xml version="1.0" standalone="no"?>');
htp.p('<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg" version="1.1">');
htp.p('<desc>Image generation demo</desc>');
htp.p('<rect x="1" y="1" width="99" height="99" fill="yellow" stroke="navy" stroke-width="1" />');
htp.p('<text x="10" y="50" font-size="20" fill="blue">');
htp.p(v_random);
htp.p('</text>');
htp.p('</svg>');
end;

Settings are:
Process Point: On Demand
Type: PL/SQL Anonymous Block

In the region footer of the page I'm working on, I changed the code to look like this:
<embed src="f?p=&APP_ID.:0:&APP_SESSION.:APPLICATION_PROCESS=word_verification" width="70" height="40" type="image/svg+xml" />

I've noted that word_verification is the correct name for my process, but I'm not getting anything back. It doesn't appear that the process is running.

To test that theory, I added an insert statement to the process and I don't seem to get any results from that either.

I do have a page zero (ID of 0 - name of Page Zero) in my app, but I didn't do anything to it for this procedure? Do I need to?

By the way, the link to what I was looking at is here:
http://htmldb.oracle.com/pls/otn/f?p=11933:25

Thanks,
Chad
cedwards

Posts: 402
Registered: 10/20/98
Re: Using Word Verification On Registration Page
Posted: May 20, 2007 8:24 PM   in response to: cedwards in response to: cedwards
Click to report abuse...   Click to reply to this thread Reply
I've got the process running now. So I see it inserting data into a table. But the SVG image isn't displaying. Must be something within the image display code then.

Chad
Jes

Posts: 5,408
Registered: 06/19/04
Re: Using Word Verification On Registration Page
Posted: May 21, 2007 12:11 AM   in response to: cedwards in response to: cedwards
Click to report abuse...   Click to reply to this thread Reply
Chad,

I would suggest putting your code onto the public Oracle server (apex.oracle.com) so that it makes it easier to see exactly what you've done.
cedwards

Posts: 402
Registered: 10/20/98
Re: Using Word Verification On Registration Page
Posted: May 21, 2007 8:48 AM   in response to: Jes in response to: Jes
Click to report abuse...   Click to reply to this thread Reply
Well I was doing that....but here, it's working. :/

The one difference. Here, I was logging into the application before the process was being called.

On my actual app, I'm trying to display this on a registration page, so they aren't logged in yet.

Is it not possible to call application level processes without being logged in? I tried removing the &APP_SESSION. and that didn't work, so my guess it I can't get there from here. :)

Chad
cedwards

Posts: 402
Registered: 10/20/98
Re: Using Word Verification On Registration Page
Posted: May 21, 2007 12:18 PM   in response to: cedwards in response to: cedwards
Click to report abuse...   Click to reply to this thread Reply
Well duh. I spend all this time worrying about web stuff I forget about the simple database side. :)

The reason it wouldn't work is apex_public_user didn't have the privilege to run it. Once I granted it, it worked!

Now...to prevent people from just reading the page source code and running the code themselves.

Chad
cedwards

Posts: 402
Registered: 10/20/98
Re: Using Word Verification On Registration Page
Posted: May 21, 2007 1:19 PM   in response to: cedwards in response to: cedwards
Click to report abuse...   Click to reply to this thread Reply
Well after a bit of digging around, I've stumbled onto another option!

This one takes advantage of something built right into the database already! If you want to know what it looks like, all you need to do is sign up for an account on apex.oracle.com.

Here's a bit of how it appears to work:

To add an image you put the following code in your html:
img width="40" height="60" ,="" src="FLOWS_030000.wwv_flow_image_generator.get_image?p_position=X&p_sessionid=&APP_SESSION."

Don't forget the < at the beginning and the /> at the end. I tried putting them in, and the board kept eating them. :)

Replace X for p_position with a valid number from 1 through 100.

When the image is generated, the string is stored in a table called wwv_flow_request_verifications. Along with the string is the session id number.

What I haven't determined yet is if you are responsible for deleting the values out of there when you're finished or something else runs later to get rid of them. From what I'm seeing so far it appears as though you're responsible.

Chad
Funky

Posts: 1,999
Registered: 09/28/04
Re: Using Word Verification On Registration Page
Posted: Jun 12, 2007 6:50 AM   in response to: cedwards in response to: cedwards
Click to report abuse...   Click to reply to this thread Reply
1) I cannot reproduce example (http://htmldb.oracle.com/pls/otn/f?p=24935:2), login data:
WORKSPACE: sdaweb
user: funky_disco_freak@yahoo.com
password: qwertz22

2) desc wwv_flow_request_verifications
or
desc FLOWS_030000.wwv_flow_request_verifications

gave me "Object to be described could not be found.", regardless I'm working on Oracle WEB SQl worksheet

Any help to make it work?

THX!
Jes

Posts: 5,408
Registered: 06/19/04
Re: Using Word Verification On Registration Page
Posted: Jun 12, 2007 6:53 AM   in response to: Funky in response to: Funky
Click to report abuse...   Click to reply to this thread Reply
Your user doesn't have permissions to see it -

SQL> conn flows_030000@testdb
Enter password:
Connected.
SQL> desc wwv_flow_request_verifications;
Name Null? Type

--------
SESSION_ID NOT NULL NUMBER
VERIFICATION_STRING NOT NULL VARCHAR2(100)
Legend
Guru Guru : 2500 - 1000000 pts
Expert Expert : 1000 - 2499 pts
Pro Pro : 500 - 999 pts
Journeyman Journeyman : 200 - 499 pts
Newbie Newbie : 0 - 199 pts
Oracle ACE Director
Oracle ACE Member
Oracle Employee ACE
Helpful Answer (5 pts)
Correct Answer (10 pts)

Point your RSS reader here for a feed of the latest messages in all forums