Thank you very much Eikinskjaldi!!!!
Can you help me further with this? I am trying to learn, not only to make the page
I have added form option to request userids from text box.
Question:
1. How do I make it so that only one querry exist (note that I made 2 querries to have separated line of usernames and then separated line with useremails.
I know if I make Select * and add line
PHP Code:
echo $row['email'].", ";
I will get email after each name. The task for me was to separate names from emails (produce namelist first and email llist second).
2. How would i go with combining html template in vbtemplates an this script. Currently all is done within php.
3. Any other comments on what I have done are very welcomed

.
4. As always I appreciate any help .-)
PHP Code:
<?php
define('THIS_SCRIPT', 'test');
// ######################## SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
// Require vBulletin backend
require_once('./global.php');
$navbits = array();
$navbits = construct_navbits($navbits);
if (is_member_of($vbulletin->userinfo, 6))
{
echo "<form name=\"form1\" method=\"post\" action=\"test2.php\">";
echo " <label>";
echo " <input type=\"text\" value=\"0\" name=\"userids\"/>";
echo " </label>";
echo " <label>";
echo " <input type=\"submit\" name=\"Submit\" value=\"Submit\" />";
echo " </label>";
echo "</form>";
//$user = $_POST['userids'];
$user = $_REQUEST["userids"];
if ( $user != "" )
{
//since i went to the trouble of importing the back end, I might as wel use it.
$query = $vbulletin->db->query("SELECT user.username FROM user WHERE userid IN ($user)");
while ($row = $vbulletin->db->fetch_array($query)) {
echo $row['username'].", ";
}
echo "<br />";
$query2 = $vbulletin->db->query("SELECT user.email FROM user WHERE userid IN ($user)");
while ($row2 = $vbulletin->db->fetch_array($query2)) {
echo $row2['email'].", ";
}
}
else {
echo "Insert userids into form above!";
}
}
else {
echo "Sorry this page is not intended for you!";
}
?>