Q:

How to set a Permanent variable with jquery

Hi guys I have seen similar sounding questions but they didnt answer what I need Im probably wording wrong the question but anyways here is the Case
For a Visual : http://screencast.com/t/iLaTfNyek
A User Will Sign up get his affiliate link enter it into the text box and click Save after that I want the image that says click here to change  its url Permanently into that users affiliate link. And it will stay like that until another user register´s and hits save.
From a logical point of view Im guessing this would involve storing the user defined url into a mysql database and then loading that variable whenever the page is loaded. I know basic Jquery and very minor mysql. And since I havent done this before I need some help on the coding it.
I would greatly appreciate any help on this.

A:

You won't be able to write directly to the database from JavaScript. You'll have to send the data back to the server (presumably using the submission of the sign-up form) and, in the server-side form handler, you can store the value in the database. A full implementation is beyond the scope of a simple question and answer; you'll need to learn some basic server-side programming.
If you want a client-side only solution, you may be able to store the value in a cookie using JavaScript so that you can read it on subsequent page views.

