Re: [PHP-DB] Password Reset

2008-02-27 Thread Daniel Brown
On Wed, Feb 27, 2008 at 1:52 AM, Nasreen Laghari [EMAIL PROTECTED] wrote: Hi, I have encrypted password in database and I encrypted using MD5(). As it is a one-way Hash so I cant get password back to original text !!! What encrypting technique I used to encrypt password so if user

RE: [PHP-DB] Password Reset

2008-02-27 Thread Bastien Koert
generate a new password and email that to the user bastien Date: Tue, 26 Feb 2008 22:52:01 -0800 From: [EMAIL PROTECTED] To: php-db@lists.php.net Subject: [PHP-DB] Password Reset Hi, I have encrypted password in database and I encrypted using MD5(). As it is a one-way Hash so I cant

Re: [PHP-DB] PHP, MySQL and Lookups

2008-02-27 Thread Daniel Brown
On Wed, Feb 27, 2008 at 9:52 AM, Tobias Franzén [EMAIL PROTECTED] wrote: Consider this, if you have not already: What if two users happen to have the same password? It is wrong to assume that no two users will never have the same password. Doing an update like that, just based on the

RE: [PHP-DB] Password Reset

2008-02-27 Thread Miguel Guirao
As every body as said, it is not a best security practice to decrypt passwords if the user forgets it. You should not provide of ways for hackers to decrypt such passwords in the event of a security incident. You better allow users to reset their passwords after providing evidence of her/his

Re: [PHP-DB] PHP, MySQL and Lookups

2008-02-27 Thread Tobias Franzén
Daniel Brown wrote: On Tue, Feb 26, 2008 at 8:55 AM, Henry Felton [EMAIL PROTECTED] wrote: Hi everyone, I'm just getting into PHP at the moment and was wondering; what code would I need to look at a field value entered in a form, then if that value is found in my table, enter all the

Re: [PHP-DB] No resultset with ocibindbyname

2008-02-27 Thread Roberto Mansfield
And here is the output of desc projekte_generisch: Name Null? Type PID NOT NULLCHAR(8) ANFANGNOT NULLVARCHAR2(8) ENDE VARCHAR2(8) LAENGENOT NULLNUMBER I believe the problem has to do with your field type for PID.

Re: [PHP-DB] No resultset with ocibindbyname

2008-02-27 Thread Manuel Schölling
Hi, select * FROM projekte_generisch where trim(pid)=:pid Thanks Roberto! This solution with trim() works like a charm! Cheers, Manuel -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] No resultset with ocibindbyname

2008-02-27 Thread Christopher Jones
Roberto Mansfield wrote: PIDNOT NULLCHAR(8) I believe the problem has to do with your field type for PID. When you run: select * FROM projekte_generisch where pid='u0test' Oracle either autotrims or autopads (I'm not sure which) so that 'u0test' matches PID even

Re: [PHP-DB] independent session data for multiple browser windows

2008-02-27 Thread Charles Whitaker
On Feb 20, 2008, at 11:18 AM, Gary Wardell wrote: They'll be accessing different account records in different windows. I keep track of the current account id in the session data, as well as a number of other account-specific items. Once I was made aware of the multiple-window requirement, and

[PHP-DB] SELECT query with multiple WHERE Clause

2008-02-27 Thread Nasreen Laghari
Hi All, Thank you for increasing my knowledge about PHP/MYSQL. I am creating a SEARCH, by only using one table. The search form is same as Inserting item (search has form of all fields in table ), difference is SEARCH page doesnt have validation . Therefore user can enter information in any

Re: [PHP-DB] SELECT query with multiple WHERE Clause

2008-02-27 Thread Chris
$query = mysql_query(SELECT * from gig WHERE gigName='$gig_name' OR WHERE gig_fdate='$sdate'); This one. I'd suggest you get a book to help you with the basics, something like this should do (first hit in amazon, haven't actually read this particular book):

Re: [PHP-DB] SELECT query with multiple WHERE Clause

2008-02-27 Thread Greg Bowser
In MySQL, both OR and || are valid logical or operators. You can only have one Where clause, thus your last example is correct. --GREG On Wed, Feb 27, 2008 at 6:44 PM, Nasreen Laghari [EMAIL PROTECTED] wrote: Hi All, Thank you for increasing my knowledge about PHP/MYSQL. I am creating a

Re: [PHP-DB] SELECT query with multiple WHERE Clause

2008-02-27 Thread Chris
Greg Bowser wrote: In MySQL, both OR and || are valid logical or operators. You can only have one Where clause, thus your last example is correct. Though in postgresql and db2 (and some other dbs) || means concatenate so stick with using the word OR in this situation otherwise you'll run

Re: [PHP-DB] SELECT query with multiple WHERE Clause

2008-02-27 Thread Daniel Brown
On Wed, Feb 27, 2008 at 6:44 PM, Nasreen Laghari [EMAIL PROTECTED] wrote: I am creating a SEARCH, by only using one table. The search form is same as Inserting item (search has form of all fields in table ), difference is SEARCH page doesnt have validation . Therefore user can enter

Re: [PHP-DB] SELECT query with multiple WHERE Clause

2008-02-27 Thread Stut
On 27 Feb 2008, at 23:44, Nasreen Laghari wrote: Thank you for increasing my knowledge about PHP/MYSQL. The question you ask below is basic SQL syntax. Please read the MySQL manual before asking here - answers at this level are all in there. http://mysql.com/doc Oh, and once you have it

Re: [PHP-DB] SELECT query with multiple WHERE Clause

2008-02-27 Thread Stephen Johnson
$query = mysql_query(SELECT * from gig WHERE gigName='$gig_name' or gig_fdate='$sdate'); You can not use more then one WHERE in your sql statement... And SQL accepts OR and AND.. -- Stephen Johnson c | eh The Lone Coder http://www.thelonecoder.com continuing the struggle against bad code

Re: [PHP-DB] SELECT query with multiple WHERE Clause

2008-02-27 Thread TG
$query = mysql_query(SELECT * FROM gig WHERE gigName='$gig_name' OR gig_fdate='$sdate'); You only use the WHERE clause once then use parenthesis, AND and OR to create the logical conditions. If you have access to the mysql server, maybe through phpMyAdmin or something, I'd highly recommend