No action taken adding user input into database.. Somebody please help me!

Discussion in 'Databases' started by rxena, Mar 25, 2008.

  1. #1
    hi everybody, am stuck already on dealing with php.am about to add user input into database(phpmyadmin). sometimes, small thing we could not even notice! do notice me with something am not alert okay.. and here's my code:

    <input size="35" value="<? echo $form->values['txt_compadd2']; ?>" name="txt_comp_add2" type="text">

    <form name="form1" method="post" action="">
    <input type="submit" name="submit_register" value="Submit">
    </form>


    if(isset($_POST['submit_register']))
    {
    $this->proc_register();
    }


    function proc_register()
    {
    $retval = $session->register_user(isset($_POST['txt_compadd2'])? $_POST['txt_compadd2'] :'');
    }


    function register_user($str_compadd2)


    $register = $database->register_user($str_compadd2);


    function register_user($str_compadd2)
    {
    $q = "INSERT INTO user "
    ."compaddr2"
    .")"
    ."values"
    ."("
    ."'$str_compadd2'"
    .")";


    $register = mysql_query($q, $this->connection);

    somebody please help me!! really appreciate it! :)
     
    rxena, Mar 25, 2008 IP
  2. CreativeClans

    CreativeClans Peon

    Messages:
    128
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    What exactly is the problem?
     
    CreativeClans, Mar 26, 2008 IP
  3. rxena

    rxena Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    thanks for your reply!
    actually there's no problem..no stated error!
    making me crazy thinking of it. the code does not execute as expected. the user input does not get into database. i dont know where's the error because windows does not tell any error related..just that the data has not been push into database, what do you think?
     
    rxena, Mar 26, 2008 IP