php sessions problem..

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
pavanpuligandla
Forum Contributor
Posts: 130
Joined: Thu Feb 07, 2008 8:25 am
Location: Hyderabad, India

php sessions problem..

Post by pavanpuligandla »

hii..
i've a form which takes userid as input and validates it with the DB then shows a form with four fields and if they were also entered correctly it shows success message.. else error..
my problem is :
when i enter an userID say "jaoude" which exists in DB, then i can see the from fields page, there if i enter another user's say "pavan"'s details correctly then it is showing me success message,,
i've to match only user's "jaoude"'s detaisl with the DB not others..
here's my first page's query where i'm matching userID with DB:

Code: Select all

$query="SELECT customerID, Login FROM ss_customers WHERE Login='" . mysql_real_escape_string($Login) . "'";
my second page's validation code:

Code: Select all

$query="SELECT first_name, last_name, state, zip  FROM ss_customer_addresses WHERE customerID='" . mysql_real_escape_string($customerID) . "'";
User avatar
pavanpuligandla
Forum Contributor
Posts: 130
Joined: Thu Feb 07, 2008 8:25 am
Location: Hyderabad, India

Re: php sessions problem..

Post by pavanpuligandla »

any help please..
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: php sessions problem..

Post by requinix »

pavanpuligandla wrote:i've to match only user's "jaoude"'s detaisl with the DB not others
Can you rephrase that?
User avatar
pavanpuligandla
Forum Contributor
Posts: 130
Joined: Thu Feb 07, 2008 8:25 am
Location: Hyderabad, India

Re: php sessions problem..

Post by pavanpuligandla »

hii..
thanks for the come back..

i'll clearly explain you my scenario..
i need mail.yahoo.com site like password recovery functionality.
for that to achieve, i created 4 forms,
step 1 : takes userID as input and validates it with the DB, if userID found then show him step2 else repeat step1.
step2: show the same user form fields like (firstname, lastname, security question, country which he entered during the registration) if he enters the correct data then send a link to his email when clicked takes him to the password update page.. else repeat step2 only.

i achieved first 2 steps in the above scenario..
but there is a problem..
suppose in the first step say user "A" has entered his userID and sent to the second page, there if he enters his information correctly then success..
but in my case, when user A inputs his userID and gets validated then he'll be moved to the second form, there if i enter other user's details correctly(whicch were already in the DB) it is showing me success page..which it should throw an error instead.

if you want my 4 forms code, i'll paste it..
i hope you understood my problem..
i think there is a query error in my script.. please let me know your ideas so that i can paste all my 4 forms
many thanks.. :(
tech603
Forum Commoner
Posts: 84
Joined: Thu Mar 19, 2009 12:27 am

Re: php sessions problem..

Post by tech603 »

This link could help.

http://www.plus2net.com/php_tutorial/ph ... ssword.php

Hope that helps.
User avatar
pavanpuligandla
Forum Contributor
Posts: 130
Joined: Thu Feb 07, 2008 8:25 am
Location: Hyderabad, India

Re: php sessions problem..

Post by pavanpuligandla »

hii ..
This link could help.

http://www.plus2net.com/php_tutorial/ph ... ssword.php

Hope that helps.
yes surely, but i dont need those scripts, i want yahoo mail or ebay.in site like password reset feature.i'm having some sessions problem in my forms..please let me know if you can help me in that issue..
thanks.
Post Reply