create a web document with a form that registers local pilots. Use a single text
ID: 639834 • Letter: C
Question
create a web document with a form that registers local pilots. Use a single text ?le that saves information for each pilot on a separate line as data is entered into the form. Include the pilot
Explanation / Answer
data text file should be created function InsertIntoDB(&$formvars) { $confirmcode = $this->MakeConfirmationMd5($formvars['email']); $insert_query = 'insert into '.$this->tablename.'( name, email, username, password, confirmcode ) values ( "' . $this->SanitizeForSQL($formvars['name']) . '", "' . $this->SanitizeForSQL($formvars['email']) . '", "' . $this->SanitizeForSQL($formvars['username']) . '", "' . md5($formvars['password']) . '", "' . $confirmcode . '" )'; if(!mysql_query( $insert_query ,$this->connection)) { $this->HandleDBError("Error inserting data to the table query:$insert_query"); return false; } return true; }
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.