Hi everyone,
I am a newb at PHP and have used it very minamally in the past (includes and forms) yet I have a series of questions about PHP and databases and capturing specific information. Here is my scenerio:
I have a page that does not refresh (this might make or break everyones answers that is why I mention it first). All user interaction is being done via Ajax or Jquery (Javascript). That said, I have a menu where the user can make a selection (clicking on an HREF or link) and that selection is being told by the javascript to display elsewhere on the page. Once they make that selection, a submit button appears and when they click it, they get another list of selections - all the while the page has yet to refresh.
The question is, can I somehow send the values of the HREF to a sql database for tracking purposes and if so, how?
When I ask how, I am needing to know how to target the Href, assign it a $name, and then somehow get it to the database. As I stated above I know you can do this with a form and I know how to do that very easily. But there is no 'name' attribute in HREF and also I am not using a <form> with the selections.
I am currently using the "title" attribute to show the user what selection they have clicked. Do I need to assign the HREF some other attribute (as with the 'name' attribute in an input tag) so that I can have a PHP script that knows what HREF link has been clicked? In my mind I know there has to be a way but being so fresh to PHP, I cannot figure out how to even begin to write this.
Thanks so much for the help guys