function troubles...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I don't know whats wrong with this. Can someone help please.

<?php
require "sql.php";

function shit_func($var)
{
$sql = "select * from users where sessionid='$sessionid' ";
$kys = mysql_query($sql);
$user = mysql_fetch_row($kys);
$k_tun = $user[0];
$ok1 = $user[4];
$ok2 = $user[5];
$ok3 = $user[6];
$ok4 = $user[7];
$ok5 = $user[8];
$ok6 = $user[9];
$ok7 = $user[10];

echo "$var";
echo "$k_tun";
echo "$ok1";
echo "$ok2";
echo "$ok3";
echo "$ok4";
echo "$ok5";
echo "$ok6";
echo "$ok7";
}
$test=shaisse;
shit_func($test);
?>

This will print: "shaisse" but nothing else. I need to know why the other 
variables won't print. The sql query worksand echoes work if not used in 
function. I tested it in an other file and it worked but when I put it in a 
function it doesn't work.

Help Appreciated!
Thanks
-Will 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux