Support » Plugins » Username in blankpage

  • hello everybody
    i want to make a small php game for wordpress. and i want to
    be able to take over the session/cookie :s or whatever of wordpress and make the username apear on a blank page.
    so whenever ppl win at my slot machiene , they can get “money”. the script for the slots i got to work. but now i just need to query it to the right user and i think i need to use sessions or get the right username for the WHERE part of the quere. could somebody help me ? i’m new to plugin making.

    thanks a lot!

Viewing 3 replies - 1 through 3 (of 3 total)
  • don’t i need to connect to the databse or something ? or take over a sesssion , cause when i just put

    <?php global $userdata;
          echo('Username: ' . $userdata->user_login . "\n");
          echo('User level: ' . $userdata->user_level . "\n");
          echo('User ID: ' . $userdata->ID . "\n");

    in a file it doesn’t do anything. so i need a session / db connection?

    i am reading about cookies , how do i get the username out of the cookie 🙂 $_COOKIE[???

    got it to work , needed the blog header 🙂 tnx

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Username in blankpage’ is closed to new replies.