<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Gravity Support Forums Topic: Database look-up validation</title>
		<link>https://legacy.forums.gravityhelp.com/topic/database-look-up-validation</link>
		<description>Gravity Support Forums Topic: Database look-up validation</description>
		<language>en-US</language>
		<pubDate>Mon, 20 Apr 2026 08:21:33 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.1</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>https://legacy.forums.gravityhelp.com/search.php</link>
		</textInput>
		<atom:link href="https://legacy.forums.gravityhelp.com/rss/topic/database-look-up-validation" rel="self" type="application/rss+xml" />

		<item>
			<title>Chris Hajer on "Database look-up validation"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/database-look-up-validation#post-43808</link>
			<pubDate>Mon, 12 Dec 2011 16:59:21 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">43808@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;OK, that's AWESOME news.  Please do let us know if you need anything else.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>briare on "Database look-up validation"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/database-look-up-validation#post-43805</link>
			<pubDate>Mon, 12 Dec 2011 16:21:42 +0000</pubDate>
			<dc:creator>briare</dc:creator>
			<guid isPermaLink="false">43805@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;It worked the first time…amazing.  Gravity Forms just got a new promoter.&#60;/p&#62;
&#60;p&#62;If anything comes up, I will let you know.&#60;/p&#62;
&#60;p&#62;Thanks!!!!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Database look-up validation"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/database-look-up-validation#post-43761</link>
			<pubDate>Mon, 12 Dec 2011 10:39:22 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">43761@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Q1 - I put it up only so that it is not accessible by URL.  Otherwise, people could download the file and get all the serial numbers, right?  So, if your website example.com is visible at this location  /home/briare/htdocs/example/index.php, you want to put it ABOVE that, so it can't be accessed at anything beginning with example.com.  That's the only reason for doing it like this.  If you put it in your theme folder, you can always give it a crazy long name and then just use that name in the function.  Or protect it in some other way.&#60;/p&#62;
&#60;p&#62;My website gravity.chrishajer.com comes up here:&#60;br /&#62;
/kunden/homepages/99/d12345678/htdocs/gravity/index.php&#60;/p&#62;
&#60;p&#62;So I went up one level:&#60;br /&#62;
/kunden/homepages/99/d12345678/htdocs/numbers.txt&#60;/p&#62;
&#60;p&#62;That is not accessible by URL.&#60;/p&#62;
&#60;p&#62;Q2. You're right.  On failure they never get to the confirmation page, so there is no issue there.  When I wrote that for another project, I needed to do something crazy in the confirmation redirect, so I needed this.  I think you will be fine using the form builder confirmation.  You can use the query string if you need to send that 9 digit number to the next page.  Just drop that last block of code altogether.  Sorry for the confusion there.&#60;/p&#62;
&#60;p&#62;Q3.  All this code goes in your theme's functions.php.  You can learn where to put the code by reading here: &#60;a href=&#34;http://www.gravityhelp.com/documentation/page/Where_Do_I_Put_This_Code%3F&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/documentation/page/Where_Do_I_Put_This_Code%3F&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Be sure the change the form ID from 70, and make sure the field is input_1 - if it's the only field in the form, it will be.  Let us know if you need more help.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>briare on "Database look-up validation"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/database-look-up-validation#post-43736</link>
			<pubDate>Mon, 12 Dec 2011 06:07:53 +0000</pubDate>
			<dc:creator>briare</dc:creator>
			<guid isPermaLink="false">43736@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;This is all very exciting, as you can tell from the time, I couldn't wait to get into it.&#60;/p&#62;
&#60;p&#62;Okay, question 1.  line 26 how far up does the path need to be?  Does it include the domain or is it until the directory where the Word Press directories are kept?&#60;/p&#62;
&#60;p&#62;Question 2.  I am a bit confused on lines 41-44.  It appears that I simple replace URL with my &#34;success&#34; page, but I am not 100% sure.&#60;/p&#62;
&#60;p&#62;Question 3.  Now that I have tweaked your code to fit my form, how do I add it to the form.&#60;/p&#62;
&#60;p&#62;Thanks
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Database look-up validation"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/database-look-up-validation#post-43732</link>
			<pubDate>Mon, 12 Dec 2011 02:56:30 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">43732@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi @briare  - here is some code I have modified from something I used previously.&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://pastebin.com/7ANQh6Rc&#34; rel=&#34;nofollow&#34;&#62;http://pastebin.com/7ANQh6Rc&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;There are 3 pieces to it:&#60;/p&#62;
&#60;p&#62;lines 4-20, validate the code that is entered and return a validation error if it fails&#60;br /&#62;
lines 25-35, the actual function to compare the entered code to all codes in your file&#60;br /&#62;
lines 39-45, the confirmation redirect&#60;/p&#62;
&#60;p&#62;See if this gets you started and ask questions as you go along.  Thanks.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>briare on "Database look-up validation"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/database-look-up-validation#post-43270</link>
			<pubDate>Tue, 06 Dec 2011 19:07:17 +0000</pubDate>
			<dc:creator>briare</dc:creator>
			<guid isPermaLink="false">43270@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Do you have a place for me to send it or do you want me to just add it to a posting?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Database look-up validation"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/database-look-up-validation#post-43061</link>
			<pubDate>Sun, 04 Dec 2011 15:45:07 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">43061@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;@briare - I will help you with this on Monday.  Please send me the file, or a portion of it, so I know what kind of data we're looking it.  Thanks.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>briare on "Database look-up validation"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/database-look-up-validation#post-42851</link>
			<pubDate>Fri, 02 Dec 2011 04:20:56 +0000</pubDate>
			<dc:creator>briare</dc:creator>
			<guid isPermaLink="false">42851@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;lets go with the text file.  That seems very easy for me to upload to the site.  If we go with two forms, I would imagine there would be a submit button on form 1 which then takes them to form 2 where they enter the number and we take it from there.&#60;/p&#62;
&#60;p&#62;Is the validation different than what we see on Gravity forms now?   The question is highlight in red.  Would it be different?  it does't really matter.  If it is easier to do two forms, lets do two.&#60;/p&#62;
&#60;p&#62;I have the text file ready to go.  What is my next step?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Database look-up validation"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/database-look-up-validation#post-42816</link>
			<pubDate>Thu, 01 Dec 2011 20:15:02 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">42816@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Your host may have already installed phpMyAdmin or some other tool to manage the database graphically.  Installing it yourself would probably not be a good idea as it requires some configuration and decisions to ensure it is secure.&#60;/p&#62;
&#60;p&#62;We can't help you with the design and creation of the table.  Creating a new table &#60;strong&#62;might&#60;/strong&#62; be a good idea, to keep it separate from your WordPress tables, but that complicates access a little bit.   It seems though that your table will be very simple, just one column of values.  You could even just create a plain text file and store it on your web server somewhere, where it's not publicly accessible and downloadable.  That might be an easier solution.&#60;/p&#62;
&#60;p&#62;You could create the file with one value per line just as you have pasted. &#60;/p&#62;
&#60;p&#62;On a very high level, you would need to read the code that is entered. So a simple one field form to check the code.  If the code is valid, continue to the next form.  Or, you can check the code entered on the form with all the other information, but if it's invalid, then they wasted their time entering all the information.  That part is up to you: one form or two.&#60;/p&#62;
&#60;p&#62;So, read the code.  Compare the code to all valid codes.  If there is a match, let them continue, show success, something like that.  If it fails, return a validation error and let them try again.&#60;/p&#62;
&#60;p&#62;Does it sound like a text file will work for you, or do you want to create a database table?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>briare on "Database look-up validation"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/database-look-up-validation#post-42749</link>
			<pubDate>Thu, 01 Dec 2011 14:08:29 +0000</pubDate>
			<dc:creator>briare</dc:creator>
			<guid isPermaLink="false">42749@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi Chris,  Any further words of wisdom on this?
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
