vBulletin Modifications

help with irc anounce

Welcome to vBHackers.com! - vBHackers Updates:

Go Back   vBulletin Modifications > General vBulletin Section > vBulletin Modification Requests

Reply
 
LinkBack Thread Tools
Old 09-04-2005, 08:25 AM   #1
Junior Member
Join Date: Sep 2004
peanut is on a distinguished road

Default help with irc anounce

$username=$_GET["username"];
if ($username!="") {
$query=mysql_query("SELECT userid FROM user WHERE username='".addslashes(htmlspecialchars($username) )."'");

if(!mysql_error()) {
$user=mysql_fetch_array($query);
} else {
print "Error";
}
$userid=$user[0];
if (!$userid==0) {
$usernfo = mysql_query("SELECT * FROM user WHERE userid='$userid'");
$userinfo=mysql_fetch_array($usernfo);
$userfield=mysql_fetch_array($userfield);


echo
LF, $userinfo[username],
LF, $userinfo[posts],
LF, $userinfo[races],
LF, $userinfo[hacks],
LF, $userinfo[scans],
LF, $userinfo[pubs],
LF, $userinfo[leeched],
LF, $userfield[country], LF,
$team;

hi all im trying to call data from the userfield is that the right way to add it
all im after doing is calling




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Old 09-04-2005, 01:56 PM   #2
Coder
Join Date: Apr 2004
Location: UK
ShavedApe is on a distinguished road

Default

There is no query for userfield so all you will get is an error for $userfield=mysql_fetch_array($userfield);

add new query above
$userfield=mysql_fetch_array($userfield);
add:
$userfield = mysql_query("SELECT * FROM $userfield WHERE userid='$userid'");

Now depending on the field name you would then call it with $userfield[field6] where field6 is the name if could be field5 or field7 etc depending on how many field you have in the userfield table.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-04-2005, 04:46 PM   #3
Junior Member
Join Date: Sep 2004
peanut is on a distinguished road

Default

thanks again thats the second time you saved me




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
IRC post announcer vB 3.5.x [UPDATED v1.3] ShavedApe vBulletin 3.5 / 3.6 Hack Releases 125 Today 12:49 PM
irc chan improve request Idan Site Feedback 11 09-09-2005 10:25 PM
IRC userstats Hyper vBulletin Modification Requests 12 09-29-2004 04:03 AM


All times are GMT -3. The time now is 09:14 PM.

Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc. (Patent Pending)