Jump to content

Validate unique username with Filemaker/PHP


This topic is 6112 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hi there,

I am setting up a username/password system and need to be able to check whether a new username is unique. I have tried doing this with PHP without much luck. Is it better to PHP or the database itself to validate a field name. How do I get Filemaker to send a warning to the web browser if the username is not unique?

Cheers,

S

Link to comment
Share on other sites

Hi S :P

Well, I don't do much FX.PHP as you probably know by now, but here's the theory:

1) Your processing Page:

a) Perform Search for a Username

:( If no records are returned - may come up as an error instead, then the username is unique, otherwise:

header("Location: yourMainPage.php?error=This%20username%20is%20taken.");

2) Your actual registration page aka "yourMainPage.php"

a) Check for an error:

if( isset($_GET['error']) ) {

echo ''.$_GET['error'].'';

}

... You know that probably wasn't very useful, but I still hope it helped - maybe come back with what you're specifically having trouble with?

Link to comment
Share on other sites

This topic is 6112 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.