I have a mysql table that contains resumes, and in it is a row titled – r_default. A user can add as many resumes as they would like, but the first one they enter is set as the default resume and can be seen by employers. I want the user to be able change the default setting to whichever resume they have on file, but I’m having difficulty working this out.
The default resume and is set to “1” and the other resumes are set to “2” (not default).
How would I write the code to make another resume the default resume?
I’ll list the resumes from the database with a link next to each one containing the resume id number, i.e.
[code=php]<a href=”change_default.php?r_id=$r_id”>Set as Default</a>
, where the page “change_default.php contains the code to change the “2” to a “1” for the default resume and the original default resume to a “2”.
This may be a simple code to write and I’m just overlooking it, but a point in the right direction would be helpful.
Thanks.