So this is my code:

<?php

// Example in menu_skuska.html 
$buffer = '';
function addMenuHeader($header_name,$id,$distance_from_top,$distance_from_left)
{
    global $buffer;
    $buffer = $buffer + '<div style="position:absolute; top:' + $distance_from_top + '; left:' + $distance_from_left + ';">';
    $buffer = $buffer + '<p onClick="toggleMenu(' + $id + ')" id="menu_header">' + $header_name + '</p>';
    $buffer = $buffer + '<div id="' + $id + '" style="visibility:hidden;">';
}

function addMenuItem($item_name,$link)
{
    global $buffer;
    $buffer = $buffer + '<a href="' + $link + '">' + $item_name + '</a><br>';
}

function finalizeMenu()
{
    global $buffer;
    $buffer = $buffer + '</div></div>';
}

function printMenu()
{
    global $buffer;
    echo($buffer);
}

addMenuHeader('Click me','menu1','100px','100px');
addMenuItem('Google','http://www.google.com');
addMenuItem('Facebook','http://www.facebook.com');
finalizeMenu();
printMenu();

?>

and it's output is number 200 instead of what i want
what i want is to output like this piece of code does:

<div style="position:absolute; top:10%; left:10%; color:green;">
    <p onClick="ToggleMenu(toggled)" style="cursor: pointer;">skuska</p>
    <div id="toggled" style="visibility:hidden;">
        skuska2<br>
        skuska3
    </div>
</div>

any ideas??? ... please help me

If you have a look at my code ... the variable is declared before its used ... didnt help, althrough i tryed globals, but no output at all ... pls help me some1

index is .php of course ... everythink worked till i tryed to generate a menu :(

I have a little problem ... my menu.php does not work and i dunno why
heres my index:

<html>
<?php

function writeOut($pageName)
{
    $buffer = fopen($pageName, r);
    $data   = fread($buffer, filesize($pageName));
    fclose($buffer);
    echo($data);
}

writeOut('head.html');
echo('<body><div id="top">');
writeOut('top.html');
echo('</div>');
/* 
in case of anomalies

ob_start();
include 'menu.php';
$result = ob_get_clean();
*/
include 'menu.php';
echo('');
// reserved for content
echo('');
writeOut('right.html');
echo('</body>');

?>
</html>

and my menu.php:

<?php

/* Example in menu_skuska.html */
$buffer = '';
function addMenuHeader($header_name,$id,$distance_from_top,$distance_from_left)
{
    $buffer = $buffer + '<div style="position:absolute; top:' + $distance_from_top + '; left:' + $distance_from_left + ';">';
    $buffer = $buffer + '<p onClick="toggleMenu(' + $id + ')" id="menu_header">' + $header_name + '</p>';
    $buffer = $buffer + '<div id="' + $id + '" style="visibility:hidden;">';
}

function addMenuItem($item_name,$link)
{
    $buffer = $buffer + '<a href="' + $link + '">' + $item_name + '</a><br>';
}

function finalizeMenu()
{
    $buffer = $buffer + '</div></div>';
}

function printMenu()
{
    echo($buffer);
}

addMenuHeader('Click me','menu1','100px','100px');
addMenuItem('Google','http://www.google.com');
addMenuItem('Facebook','http://www.facebook.com');
finalizeMenu();
printMenu();

?>

<script>

function toggleMenu(obj)
{
    if (obj.style.visibility == "visible")
    {
        obj.style.visibility = "hidden";
    }else   obj.style.visibility = "visible";
}

</script>

the menu.php is meant to generate somethink like this:

<div style="position:absolute; top:10%; left:10%; color:green;">
    <p onClick="ToggleMenu(toggled)" style="cursor: pointer;">skuska</p>
    <div id="toggled" style="visibility:hidden;">
        skuska2<br>
        skuska3
    </div>
</div>

<script>
    function ToggleMenu(obj)
    {
        if (obj.style.visibility == "visible")
        {
            obj.style.visibility = "hidden";
        }else   obj.style.visibility = "visible";
    }
</script>

so why does menu.php simply echo nothink??

<<Back|Track5 ruleeeez

I tryed ubuntu9.10, then 10.10, then 11.04 and finally now i got backtrack5

Help me to choose between Back|Track 5 and BlackBuntu pls... what are the differences

Hi everybody,
can someone help me pls finding a goot RATing tutorial for a beginner???
I wanna code a rat in python but i have no sources.

Publius commented: Stop being a skid. +0
pyTony commented: Ununderstandable -3

[CODE]
from tkinter import *
... program ...
frame = Frame(width=640,height=480)
frame.pack()
...program...

now to change the frame size

frame.configure(width=800)
[/CODE]
doesn`t work ...
I tryed from.config() too but it doesnt work

I think the easiest way to make a window, or a simple game is using allegro4.2 or 4.3:
[CODE]sudo apt-get install liballeg4.2-dev[/CODE]
or [CODE]sudo apt-get install allegro4.2-dev[/CODE].
Then open Code::Blocks and find linking in the settings adn put [CODE]allegro-config --libs[/CODE]. Now you are ready to use Allegro:
[CODE]

include <allegro.h>

/On windows/ #include <winalleg.h>
using namespace std;

int main(void) {
allegro_init(); /initialize window
install_mouse();
install_keyboard();
SET_GFX_MODE(GFX_AUTODETECT_X,y,z,0,0);
/ X - WINDOWED / FULLSCREEN
/ y,z - e.g. 640,480/800,600/1024,768/1280,960 ... as u wish it can be 100,1 too :D
/then find some sites with tutorials, but it is like pascal:
color = makecol(r,g,b);
line(x1,y1,x2,y2,color);
}
[/CODE]

thanx it worked

Hi guyz. I need some help. I don`t kno what to do now. I updated my blackbuntu and my bb theme has been lost. What to do now?

[CODE]tomashqooo@Tomashqooo:~$ python Python/tcrack.py
File "Python/tcrack.py", line 86
ostring2 = ostring2' -c 'station' mon0'
^
SyntaxError: invalid syntax[/CODE]

Thats my error message when ostring2 and station are string variabiles and ' -c ' and ' mon0' is text. Please help me whats the problem here???

My online chat uses a php script. There`s the part I need to correct
[CODE][COLOR="Red"][COLOR="red"]if(isset($_SESSION['name']) && $_POST['text'] != ""){
$search = "";
$aname = $_SESSION['name'];
function find_value($input) {
$handle = fopen("online.html", "r");
if ($handle) {
while (!feof($handle)) {
$entry_array = explode(" ",fgets($handle));
if ($entry_array[0] == $input) {
$search = $entry_array[0];
}
}
fclose($handle);
}
RETURN NULL;
}
find_value($aname);
if($search == "") {
$handle = fopen("online.html",'r');
$contents = fread($handle,filesize("online.html"));
fclose($handle);
$handle = fopen("online.html",'w');
fwrite($handle,$contents." <BR> ".$_SESSION['name']);
fclose($handle);
}[/COLOR][/COLOR][/CODE]
My problem is, so when somebody submits a message, his name is written into online.html as many times, as he writes something. But i need to write it only ones, because all that names in online.html will appear on my site as logged in users. Please help me to correct it. I need to all names appear in online.html only once.