Two questions about using my code

I have this code here:

[php]<?php
function getreg($id) {return file_get_contents(‘http://arcbots.com/userinfo.php?id=’.$id);}
function getID($reg) {return file_get_contents(‘http://arcbots.com/userinfo.php?reg=’.$reg);}
function lastseen($user) {return file_get_contents(‘http://arcbots.com/userinfo.php?lastseen=’.$user);}
function getdisplayname($user) {return file_get_contents(‘http://arcbots.com/userinfo.php?displayname=’.$user);}
function gethomepage($user) {return file_get_contents(‘http://arcbots.com/userinfo.php?homepage=’.$user);}
function getavatar($user) {return file_get_contents(‘http://arcbots.com/userinfo.php?avatar=’.$user);}
function getuserinfo($user) {return file_get_contents(‘http://arcbots.com/userinfo.php?info=’.$user);}
?>

This will search a users ID and return the Registered name <?php function display() { echo getReg($_POST['search']); } if(isset($_POST["search"])) { display(); } ?> [/php]

The code works fine but I have a question, is there a way to output the echo in a popup window?

and a side question: How would I add a drop down menu so I can use all the functions instead of one.

You can echo it into a javascript alert box by doing something like this.

[php] echo “”;[/php]

and a side question: How would I add a drop down menu so I can use all the functions instead of one.

I’m not a 100% sure what you’re asking here… Looking at your code it seems very incomplete… I don’t see where any of your variables are getting values ($id, $reg, $user)

Sponsor our Newsletter | Privacy Policy | Terms of Service