Dear All,
I would like to have a page to store previous employement history. So first I would just have two text both one the company name and the other number of years working there. Beside that I would like to have add button to add more text box for other employment history. Any idea how to achieve this via php and also the suggestion for the table structure. Thank you.
Look into using php sessions to persist data between page requests that span a user session.
Dear Cups,
How do you add the additional tex box to key in more employee name and year of service? Thank you.
if I understand correctly this would be a javascript function the add button would have an attribute like
onclick="getElementById('DIVIDTOADD').style.display=block"
once it’s displayed it’s simply a small form for them to add their new employment history and on submit then you get into the php/ mysql stuff.
Ostensibly, yes, there are at least 2 ways to do it, send the page back to the server and have PHP add the html or as smply says add it to the DOM using JS on the client.
Dear Smpily,
Do you have an example regarding it? Yes you correctly got me. Thank you. I am quite lost dont know how to start and where to start?
Javascript will give you the nicest effect for sho. Just put a onclick append textbox to the div. This would be easier using a JS framework as im pretty sure the vanilla javascript append function is a bit weird.
.appendChild(elem)
Dear Funzo,
Any sample for me to follow and start? Thank you.