Jump to content


Photo

Setting session with onclick jquery


  • Please log in to reply
2 replies to this topic

#1 Jacbey

Jacbey

    Advanced Member

  • Members
  • PipPipPip
  • 85 posts

Posted 09 February 2013 - 05:57 PM

I was wondering if it is at all possible to start a session in PHP using an onclick="" ?

I cannot find anything useful on google and I seem to fail everytime I try myself

Thanks!
The only thing you can learn from Dreamweaver is how not to build a website, and the only thing you can learn from jquery is how not to learn Javascript.

#2 denno020

denno020

    Advanced Member

  • Members
  • PipPipPip
  • 699 posts
  • LocationAustralia

Posted 09 February 2013 - 06:10 PM

You would have to use AJAX. So with your onclick, call a method that fires off an AJAX request, running the PHP script on the server that would initiate a session variable.

Denno

#3 Jacbey

Jacbey

    Advanced Member

  • Members
  • PipPipPip
  • 85 posts

Posted 09 February 2013 - 06:50 PM

Thanks muchly, that shouldn't be too hard then. :)
The only thing you can learn from Dreamweaver is how not to build a website, and the only thing you can learn from jquery is how not to learn Javascript.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com