What I essentially want to happen is hide the Screen Name section, but have whatever is typed into the Username box, be auto-copied to the Screen Name box (while its hidden).
The other method that would work, would be to tell mySQL to copy anything from table A to table B. However, I am having more issues trying to figure out the mysql function for this, so thought I would try working on things from the front end.
Summarising: you would like to have the *Username* and *Screen Name* identical (one and the same), and then have one of them inserted into a database table A and the other into table B....
For starters WHY have the form make a duplication of the *Username* especially if it is going to be the same? Send just the *Username* to the server, validate it and then write an insert query for each of the tables. That way you have an exact copy of the *Username* in each of the database tables in question, keeping in mind the *screen Name* is required to be identical.
JavaScript can do weird and wonderful things but the least it does the better, leave it up to the server because it is the final frontier for defence against the nasties.
Thanks for your reply. The form was just the standard default I am working to change. So indeed there will not be two of the same questions. I thought I would share it so that any edits could be made to it.
Right now, my biggest issue is trying to figure out where the server process file is. If I can find that, then I assume I can change a line in for "Screen Name" to actually populate to the table I want.
I am trying to work it from both angles, backend and front end, thought I would check in here if there were ideas on the front end. This is all jquery stuff.
Edit 1: here is the validation, however still trying to find the actual file that sends the data to mysql.
if( $request->isPost() ) {
$validate = new Helper_Validate();
$validate->_set_rules($request->getPost('username'), $this->translate('Username'), 'not_empty;min_length[3];max_length[100];username');
$validate->_set_rules($request->getPost('email'), $this->translate('Email'), 'not_empty;min_length[5];max_length[100];email');
Bookmarks