[PHP] function troubles...

2005-03-17 Thread William Stokes
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];

Re: [PHP] function troubles...

2005-03-17 Thread Chris Ramsay
Will Whatever you are making available in the required file sql.php, it is not accessible by the function shit_func. Define the connection string or whatever as a global inside function shit_func and it should work, else make the connection within the function - not such a good idea... chris --