Hi all,
I need to create a form that will insert data into a table (MYTABLE) in a mysql db.
I need to check that the field MYNAME and the field MYFIELD are unique.
No problem here.
In another page, in another form I need to check that MYNAME exists on the table MYTABLE and MYFIELD DOES NOT exist on the very same table (MYTABLE). How can I do this check with Kollection? I don't see anything like 'check if field exists'.
Any idea will be really appreciated.
TIA
tony
registration form without password?
Re: registration form without password?
Can you give a bit more info on what you are trying to achieve?
For a simple check all you need to do is filter the record at the mysql level and check if the field is empty or not.
Lets say you want to show the submit button or redirect the user to a different page if MYFIELD contains data.
Colname would be set to a session variable where you store the unique value for myname
With this you can then apply a Show IF SB if the MYFIELD = '' or NULL, depending on the data-type.
Another way is to check at the mysql level if the field is empty.
Colname would be set to a session variable where you store the unique value for myname
For a simple check all you need to do is filter the record at the mysql level and check if the field is empty or not.
Lets say you want to show the submit button or redirect the user to a different page if MYFIELD contains data.
Code: Select all
SELECT * FROM MYTABLE WHERE MYNAME = colname
With this you can then apply a Show IF SB if the MYFIELD = '' or NULL, depending on the data-type.
Another way is to check at the mysql level if the field is empty.
Code: Select all
SELECT * FROM MYTABLE WHERE MYNAME = $_SESSION_myname AND MYFIELD = '' or
SELECT * FROM MYTABLE WHERE MYNAME = $_SESSION_myname AND MYFIELD != ''