View Single Post
  #1 (permalink)  
Old December 26th, 2007, 03:51 AM
syedferhat syedferhat is offline
Registered User
Join Date: Apr 2004
Location: Karachi, , Pakistan.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to syedferhat
Default Undefined Varriable


I do turned on register_globals=On in php.ini but still got same error
"[26-Dec-2007 12:37:20] PHP Notice: Undefined variable: uname in E:\Inetpub\wwwroot\Intranet\DataAccess.php on line 96"

Although i checked again all the variable name on both page. Can u plz let me know whats the problem and how to resolve the codes
Please also answer me on my this email id too

following are the codes to retrieve the value on action ( Form target)page

/* Calling a function

/* Function to retrive value and put into the database
function Enter_New_Entry($uname,$pwd,$dept) {

        First, we create a connection to our ODBC source. This is done by creating
        a connection. Once this is done, we are returned an ODBC connection number.
        We use this number to use the ODBC functions within PHP.

    $cnx = odbc_connect('intranet','','');
    if (!$cnx) {
        Error_handler( "Error in odbc_connect" , $cnx );
    $SQL_Exec_String = "Insert Into Users2 (uname, pwd, dept)
            Values ('$uname', '$pwd', '$dept')";
    $cur= odbc_exec( $cnx, $SQL_Exec_String );
    if (!$cur) {
        Error_handler( "Error in odbc_exec( no cursor returned ) " , $cnx );

    odbc_close( $cnx);

Reply With Quote