Forum Moderators: coopster

Message Too Old, No Replies

Help putting something in a variable

         

Champak

4:03 am on Feb 9, 2007 (gmt 0)

10+ Year Member



I need to modify a script and put something in a variable to be used elsewhere.

The script I am using is using the following function to grab the email address of the current user from the database and display it:

<?php global $my; return $my->email;?>

What I want to do is take that and use it in a query, but I can't put it directly in the query, and I can't seem to figure out how to put it into a variable...mainly because although I've seen it before, this is my first time directly interacting and trying to modify something that looks like "$my->email". I've tried the following:

$var = $my->email;
and
$var = return $my->email;
and
$var = global $my; return $my->email;
and a few other combonations.

Of course none of them worked. Can someone please show me how to do what I want to accomplish?

Thanks.

Champak

11:14 am on Feb 9, 2007 (gmt 0)

10+ Year Member



What I was doing was actually working, it was something totally unrelated that was messing things up.