Php Help!!!!!

Discussion in 'OT Technology' started by Mikey, Aug 25, 2003.

  1. Mikey

    Mikey This one, this form I hold now, so Wide eyed and h

    Joined:
    Oct 18, 2001
    Messages:
    23,118
    Likes Received:
    0
    Location:
    Baltimore
    Ok, here's my config code. for some reason im getting parse errors all over hte place. ive been coding for hours and I have a feeling im missing something simple. can you see anything? Here's my config code....

    PHP:
    <?php

    if ( ! defined 'CONFIG' ))
    {
        
    define 'CONFIG');



        
    // Databese login information
        // Must be filled in for the system
        
    $db_uname  'REFER';
        
    $db_pword  'password';
        
    $db_schema 'schema';



        
    // General defines and globals

       
    function dbConnect ($Connection)
        {
          global 
    $Connection$db_uname$db_pword$db_schema;

          
    $Connection = @ocilogon $db_uname$db_pword$db_schema );
          if ( 
    $Connection != null )
          {
            return 
    $Connection;
          }

            exit;
            
    //die ( "Unable to connect to Oracle." );
          
    }


        
    /* ------------------------------------------------------------------------- */
        
    function dbExecute $sql )

      {
         
    $sql  "INSERT INTO ";
         
    $sql .= " inet_refer (";
         
    $sql .= " user_id ";
         
    $sql .= ") VALUES ( ";
         
    $sql .= $_SESSION['refer'] ." )";


     {
            
    $ret_val false;

            if (( 
    $Connection dbConnect ()) != null )
            {
                
    $Statement = @ociparse $Connection$sql );
                
    // Default mode is commit on success
                
    if ( @ociexecute $Statement ))
                {
                  
    $ret_val true;
                }
                @
    ocifreestatement $Statement );
                @
    ocilogoff $Connection );
            }
            return 
    $ret_val;
        }

    ?>
     
  2. RaginBajin

    RaginBajin Have you punched a donkey today?

    Joined:
    Dec 24, 2001
    Messages:
    8,740
    Likes Received:
    0
    Location:
    NoVA
    You might of forgotten a } at the end of the dbExecute Function..
     
  3. Jericho

    Jericho Active Member

    Joined:
    Oct 21, 2002
    Messages:
    34,140
    Likes Received:
    0
    and I think you also added an extra "{"

    post the error codes
     
  4. Leb_CRX

    Leb_CRX OT's resident terrorist

    Joined:
    Apr 22, 2001
    Messages:
    39,994
    Likes Received:
    0
    Location:
    Ottawa, Canada
    your missing two '}' from the looks of it, but I dont code php so :eek3:
     
  5. RaginBajin

    RaginBajin Have you punched a donkey today?

    Joined:
    Dec 24, 2001
    Messages:
    8,740
    Likes Received:
    0
    Location:
    NoVA

    I change my answer and go with this guys answer.

    :)
     

Share This Page