Calling the info from the form to work on it in the process file

Home Forums Quform PHP Calling the info from the form to work on it in the process file

This topic is: resolved
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #6320
    cruxy
    Participant

    Hello,

    How can I call the information from the form to use it OUTSIDE the query like this?

    $username = ” ‘” . $from[‘surname’] . “‘. ‘” . $from[‘lastname’] . “‘ ” ;

    The surname and the lastname are from:


    //$surname
    $surname = new Quform_Element('surname', 'Surname');
    $surname->addFilter('trim');
    $surname->addValidator('required');
    $form->addElement($surname);

    //$lastname
    $lastname = new Quform_Element(‘lastname’, ‘Last name’);
    $lastname->addFilter(‘trim’);
    $lastname->addValidator(‘required’);
    $form->addElement($lastname);

     

    And the query is:


    // Build the query
    $query = "INSERT INTO dabase_users SET ";

    $query .= “user_surname = ‘” . mysql_real_escape_string($form->getValue(‘user_surname’)) . “‘,”;
    $query .= “user_lastname = ‘” . mysql_real_escape_string($form->getValue(‘user_lastname’)) . “‘,”;

    $query .= “user_name = ‘” . $username . “‘,”;

     

    Thank you in advance,
    Cruxy

    #6323
    cruxy
    Participant

    I solved it. Thank you anyway:)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Be inspired. © 2024 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy