Copy link to clipboard
Copied
Hi there,
I'm such a noob to this, but I have successfully built a PHP website, with the help of many tutorials, and I have uploaded a database to my clients PhpMyAdmin for use on the login page of the website.
The login page is a simple Email and Password form, and it works fine with the allocated email and password my client has chosen, but they have now asked me to make it so any email can be used in the form, but when I go into the table in the database and delete the email and leave it blank, but keep the password only, it doesn't seem to work in the site. Is there a simple way to allow any email in the username/email field of the form? But of course keep the password we've allocated to the password field.
Unfortunately someone else built the database, all I used was the 'Log In User' table from it. I'm not to familiar with the PhpMyAdmin interface.
Thanks!
Copy link to clipboard
Copied
You should have no trouble if you UPDATE the field with another email, which would be preferable if these fields are supposed to be used for a log in. Deleting the email and leaving the field blank may lead to other application errors, depending on how things are written.
To do what you are asking you may need to open up the database itself and set the field to allow NULL values then delete the emails in this field. But again, I'd advise against this.
--
Lawrence Carmer - *Adobe Community Professional*
http://www.Cartweaver.com
Complete Shopping Cart Application for
Dreamweaver, available in PHP and ColdFusion
Stay updated - http://blog.cartweaver.com
Copy link to clipboard
Copied
G'day Lawrence, thanks for your advice!
I'm going to tell my client to stick to just one default email for use on the site, or a few different ones if they need. I tried setting the field to NULL in the past and it just screwed things up, you're right.
Thanks again!
Cam
Copy link to clipboard
Copied
The login user server behavior requires both a login and password credentials. If you want to only validate the password, you would need to change the script. This can be done quite easily if you are familiar with server side scripting. But of course, the greatly diminishes the security so you need to only due this if security on the site is not a major concern.
Copy link to clipboard
Copied
This was actually my next question Bregent. The client has now asked for a password login only, but the standard 'Log In User' behavior I've used in DW requires both login and password, you're right. If you could point me in the right direction into what file I edit that would be a great help! The only connection I can see is the PHP connection to the database.
I've warned my client about the risk of jeopardizing the security of the site but they've said 'Go ahead'.
Cheers,
Cam
Copy link to clipboard
Copied
Borrowing from my typo in my other post, I don't 'due' php so I really can't help much with that scripting language. But if it is similar to the ASP/VB scripting that DW generates, I would probably abandon the server behavior completely and just code the entire script by hand. That's because anytime you modify a server behavior script, it renders it unable to be maintained by the DW wizard. How familar are you with php?
Copy link to clipboard
Copied
Oh ok, no worries!
I'm not that familiar with PHP I'm afraid 😞 And I wouldn't be much use coding anything by hand.
Should I just search for a simple 'password only' form that doesn't need the use of a MySql database? That might be a quick fix.
Thanks.
Copy link to clipboard
Copied
That's what I would suggest. If you are not authenticating against stored login/pwd pairs, then there is no need for a database. You can simply store the pwd in the server side script. And there really is no point to even have the user enter their email address, right?
Copy link to clipboard
Copied
Yeah cool, that's what I thought.
The client had all these elements they thought they needed implemented into the site, until they saw the whole package live of course, so I guess I'll just scrap the whole database method.
Do you know of a simple tut I could follow on building such a password validation or some files I could download? Not sure if DW has one I could use in it. It should just be a form with an external PHP password validation.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more