# MySQL / PHP getting variable question

**URL:** <https://forum.kirupa.com/t/mysql-php-getting-variable-question/169176>\
**Category:** programming\
**Created:** [November 14, 2005, 6:39am UTC](https://forum.kirupa.com/t/mysql-php-getting-variable-question/169176 "2005-11-14T06:39:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Casenote](https://avatars.discourse-cdn.com/v4/letter/c/82dd89/32.png) [@Casenote](https://forum.kirupa.com/u/Casenote)\
**Post date:** [November 14, 2005, 6:39am UTC](https://forum.kirupa.com/t/mysql-php-getting-variable-question/169176/1 "2005-11-14T06:39:54Z")

</div>

I have a website that is ran off of MySQL and PHP. I want to make a nice flash menu for the top. Most links are simple enough and just require a link to the php: i.e.

/browse.php

But when I member logs in and wants to check his/her profile it needs to get thier userid.

What is the best way to do this…I am primarily a designer, and secondly a coder…so the most simple/explained answer would be best.

I need the button to look like this in the end:

```auto

getURL("userdetails.php?id=<-Whatever their ID is!","_self");

```

This is what a wild guess start that I named: getuser.php

```auto
<?PHP
function userlogin() 
global $SITE_ONLINE;
unset($GLOBALS["CURUSER"]);
<? <a>userdetails.php?id=$CURUSER[id]</a>
;?>
stdfoot();
?>

```

I am not opposed to using a completely different way , since I don’t know what I’m doing in the first place!

Case
