Add to shortlist

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
leewad
Forum Commoner
Posts: 91
Joined: Tue May 11, 2004 8:32 am

Add to shortlist

Post by leewad »

Hi

Im am trying to pass a unique reference number to the database without leaving the page, any tips how to do this?

Basically there will be a link "add to shortlist" you click this then the data stored in the link will be added to the database, the page is also mod rewritten if this makes a difference http://www.test.com/forsale/3-beds-2-ba ... nt/R121212 for example
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: Add to shortlist

Post by Celauran »

leewad wrote:Im am trying to pass a unique reference number to the database without leaving the page, any tips how to do this?
AJAX?
leewad
Forum Commoner
Posts: 91
Joined: Tue May 11, 2004 8:32 am

Re: Add to shortlist

Post by leewad »

i have had a look at ajax but not sure how to use it
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: Add to shortlist

Post by Celauran »

Take a look at this: http://api.jquery.com/jquery.ajax/

Essentially you create a PHP script (or controller action) that handles the DB interaction and use JS to interact with it rather than having the browser go there directly.
Post Reply