MySQL Forums
Forum List  »  PHP

Re: Query Using Session ID
Posted by: Andy Benham
Date: April 02, 2017 02:49PM

Hi Peter,

Thanks for the help, can you tell what I did?

To much time spent writing 'C' for me I think, I got the variables the wrong way round :P

Reversing to:

$username = $_SESSION['username']

and it's all sweet as a nut.

I just got the right-side leftward! :P

Thank you for your help! :)


Peter Brawley Wrote:
-------------------------------------------------------
> Are you seeing an error message?
>
> To debug such things, have the script echo the
> query ...
>
> $sql = "SELECT `firstname`, `lastname` FROM
> `members` WHERE username='$username'";
> echo $sql;
>
> Just seeing what the script produces may identify
> the problem. If not, copy/paste the query into the
> mysql client and run it there.

Options: ReplyQuote


Subject
Written By
Posted
April 02, 2017 01:52PM
April 02, 2017 01:55PM
April 02, 2017 02:39PM
Re: Query Using Session ID
April 02, 2017 02:49PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.