Home › Forums › Quform PHP › Calling the info from the form to work on it in the process file
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’)) . “‘,”;
user_surname
user_lastname
$query .= “user_name = ‘” . $username . “‘,”;
user_name
Thank you in advance, Cruxy
I solved it. Thank you anyway:)