php - MySQL check title from form input for same value, if same ignore, if different update another table? -


i have "edit" form loads various text inputs pre-populated data (which entered through “input” form). have 2 important text inputs unique because user can choose enter custom title or custom description (as opposed using default title and/or description).

first off, students have sttitlepref tells if prefer common or scientific titles (tktitlesci, tktitlecom). so, known front. discussion, let’s assume common pre-selected (tktitlecom).

logic

in event user had created taskinstance in “input” form default title, when “edit” form loads prepopulated data, load default title. when user submits form, database check see if title same default. if same, don’t want add data taskinstance.tkinstcustomtitlecom (it should remain null) , form data field ignored. want taskinstance record rely on taskinstance.fktaskid load tasks.tktitlecom.

in event user had created taskinstance in “input” form custom title, when “edit” form loads prepopulated data, load custom title. when user submits form, database check see if title same default. since not same, want add data taskinstance.tkinstcustomtitlecom.

i apply same logic tkdesc , tkinstcustomdesc. can me started on mysql? not sure start. pages using php.

database

students 1.) stid 2.) stnamefirst 3.) stnamelast 4.) sttitlepref 5.) fkproid  tasks 1.) tkid 2.) tkside (the task nature has side?: y or n)  3.) tktitlesci 4.) tktitlecom 5.) tkdesc  taskinstance 1.) tkinstid 2.) tkinstside (which side task?: l, r or null) 3.) tkinstcustomtitlesci 4.) tkinstcustomtitlecom 5.) tkinstcustomdesc 6.) fktkid 7.) fkstid 


Comments

Popular posts from this blog

node.js - Bad Request - node js ajax post -

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -