Posted by William Stokes on 03/17/05 15:39
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
Navigation:
[Reply to this message]
|