General Community > Scripting Help

Error when trying to make a sub directory

(1/3) > >>

hi gang was hoping for a hand i have this code which i use to pull usernames to irc but when i try  make a roomslist with this code

--- Code: ---'menu_action' => array(
'title' => 'text for menu',
'href' => $scripturl,
'show' => true,
'sub_buttons' => array(
'sub_menu_action' => array(
'title' => 'text for sub-menu',
'href' => $scripturl . '?action=newaction',
'show' => true,
'is_last'=> true,

--- End code ---

i get a error on line 32 on my index.php this is my index.php code

--- Code: ---<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">
<html xmlns="" xml:lang="en">
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <meta name="language" content="en" />
 <meta name="author" content="Valentin Manthei -" />
 <title>Chatterzz Client</title>
 <script type="text/javascript" src="swfobject.js"></script>
    $temp = trim($_GET['nick']);
if(!empty($temp) && ctype_alnum($temp)) {
    $nick = $temp;

$db_server = 'localhost';
$db_name = 'admin_xxx;
$db_user = 'admin_xxx';
$db_passwd = 'xxxxxxx';

$link = mysql_connect($db_server, $db_user, $db_passwd);

$qry = "SELECT id_member FROM `smf_members` WHERE member_name = '$nick'";
$result = mysql_query($qry);

if(!mysql_num_rows($result) || mysql_num_rows($result) == 0) {

$bln = true;
} else {
    redirectss(); [color=red]This the trouble area  [/color]

 <script type="text/javascript">
var nickname = "<?php echo $nick; ?>";
 <script type="text/javascript" src=""></script>
 <script type="text/javascript" src="config.js"></script>
 <style type="text/css">
html { height: 100%; overflow: hidden; }
body { height:100%; margin:0; padding:0; background-color:#999; }

<?php if($bln) { ?>
 <h1 style="margin: 0 auto; text-align:center;color:blue;">New Chatterzz Central </h1><center><a href="" target="_blank">Home</a> <a href="" target="_blank">Forum</a></center>
 <div id="lightIRC" style="height:89%; text-align:center;">
  <p><a href=""><img src="" alt="Get Adobe Flash player" /></a></p>
 <script type="text/javascript">
swfobject.embedSWF("lightIRC.swf", "lightIRC", "100%", "89%", "10.0.0", "expressInstall.swf", params);
 <?php } ?>

--- End code ---

I'm no coder. So, this could be total bollox.

But, shouldn't:

--- Code: --- } else {
    redirectss(); [color=red]This the trouble area  [/color]
--- End code ---


--- Code: --- }
else {
    redirectss(); [color=red]This the trouble area  [/color]

--- End code ---


Chen Zhen:
Before I post code with some fixes please give some more details..

Which smf version are you using?
Is this an actual template file or is this page being displayed within another page on your forum or from a portal?
Is the database you are accessing the same as your forum where you are attempting to display this data?


--- Code: ---$db_name = 'admin_xxx;
--- End code ---
should be

--- Code: ---$db_name = 'admin_xxx';
--- End code ---

Ty for the replies

Smf version 2.02
Simple portal 2.3.4

this is  a page being displayed external
the db is the db for forum

What i am trying to do is make a heading Chatrooms then a list of 4 to 5 rooms underneath so users just click the room they need, instead of using one room to access the other rooms


[0] Message Index

[#] Next page

Go to full version