Forums

Database submit question

Jim Nayzium 17 Dec, 2009
Built a form - works perfectly.
Built db connection - works perfectly.
even built a chronoconnectivity page to display perfectly - love it all -- (with exception that connectivity should be able to connect to multiple databases like the DWeaver connection tools...but that is coming I am sure...)

Here is my question ---

I want to limit my users to being able to submit this form I created ONLY once per email of the registered user...

So I want to run a search on my database PRIOR to submitting based on whether or not that USER ID or that USER EMAIL is already in my newly created TABLE...

Does that make sense?

In regular PHP I would just create the select statements then run the loop to see if I hit pay-dirt or not --- but where would I go about inserting this logic into the mix chronologicallly (no pun intended...)
Jim Nayzium 17 Dec, 2009
OK<

I have already started my own answer but I still need more help.

I can write the Submit URL and keep it out on the server -- but where does THAT external file need to send ITS results back to in order to keep the flow moving?

Does that make sense?
GreyHead 17 Dec, 2009
Hi Jim Nayzium,

It's probably not useful to change the Submit URL as there is no easy way back.

Assuming that your form is for Registered Users ony then run the check at the beginning of the Form HTML and only show the form if the user hasn't already recorded the results. If they have then either show a message or redirect to a more useful page.

Bob
Max_admin 15 Jun, 2010
it means the PHP code which will be used to check the database to find if the email address has already submitted the form before
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
lferrara 19 Jun, 2010
So do you mean the syntax in changed when you modify the submit URL? Is that why its not easy to revert? New to this as well, so I might be missing something. Ken
This topic is locked and no more replies can be posted.