crispinternet
ISP
Hi there
i am new to programming with php and have a small problem i need to over come, what i am trying to do is pull data back from my database but make specific to the person who logged in, i can manage to insert data but i can pull any out, i think the problem is either the code i am using is wrong, or its not in the right dir.
i have accounts dir
in there is my php session
i have details.php which has clients details on
when they log in and go to details i want it to pull the details specific to that user using i would imagine
$result = mysql_query("SELECT * FROM customers
WHERE username ='$login'") or die(mysql_error());
and then would need to echomout the data once verified
$row = mysql_fetch_array( $result ); // Print out the contents of each row into a table
echo $row['phone']." - ".$row['email'];
i have cut it down to make it easy reading
i know the field names are correct bit i cant
pull any data back at all.
i need some code which will pull this back as per
the person who has logged in
any one have any ideas
its causing me great pain, i just want to put my foor through my poooter
cheers
Alan
i am new to programming with php and have a small problem i need to over come, what i am trying to do is pull data back from my database but make specific to the person who logged in, i can manage to insert data but i can pull any out, i think the problem is either the code i am using is wrong, or its not in the right dir.
i have accounts dir
in there is my php session
i have details.php which has clients details on
when they log in and go to details i want it to pull the details specific to that user using i would imagine
$result = mysql_query("SELECT * FROM customers
WHERE username ='$login'") or die(mysql_error());
and then would need to echomout the data once verified
$row = mysql_fetch_array( $result ); // Print out the contents of each row into a table
echo $row['phone']." - ".$row['email'];
i have cut it down to make it easy reading
i know the field names are correct bit i cant
pull any data back at all.
i need some code which will pull this back as per
the person who has logged in
any one have any ideas
its causing me great pain, i just want to put my foor through my poooter
cheers
Alan