Possible but a little more complicated than what you describe.
First where are you going to prevent entries (file or SQL db or other)?
Next you have to read the db before you can determine if the entry already exists. This is not simple with the current form design if you want this to occur before submitting the form. After submission is easier but it forces the user to re-enter the form data after submission.
Either way is a bit of custom work for your form but it is most certainly possible.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ah yes I imagine it would not be easy. But good to know that it is possible.
For the scenario I'm thinking of, it would have to be - after submission (i imagine) .
Example:
A user is creating his profile, he chooses a pseudonym - clicks on submit and a message bounces back saying that that name is already in use and he needs to choose another. But the form does not reset for all the other entries he's made...just the pseudonym.
Hi
the forms work great.
I just wanted to know where and with what code do I need to prevent - same user name or user email entries.
As is I can enter the same name or emails over and over...
is it possible to add a ? -
$curnum ++;
echo “<font color=’red’>” . $curnum . “. The email ‘”.$email.”‘ already exists!</font><br>\n”;
thank you
Possible but a little more complicated than what you describe.
First where are you going to prevent entries (file or SQL db or other)?
Next you have to read the db before you can determine if the entry already exists. This is not simple with the current form design if you want this to occur before submitting the form. After submission is easier but it forces the user to re-enter the form data after submission.
Either way is a bit of custom work for your form but it is most certainly possible.
Ah yes I imagine it would not be easy. But good to know that it is possible.
For the scenario I'm thinking of, it would have to be - after submission (i imagine) .
Example:
A user is creating his profile, he chooses a pseudonym - clicks on submit and a message bounces back saying that that name is already in use and he needs to choose another. But the form does not reset for all the other entries he's made...just the pseudonym.
____________
In the phpFprmGenerator downloaded form there are
2 html's - form and confirm
3 php's - install, processor, captchaSecurityImages
Would the implemention of such a command require making changes in several code pages or just one - and which ones ?
Only the processor file. You need to check the database first for duplicates of a field, then allow or not allow processing to continue.
logical.
thank you