Thanks

make a thanks button count per user

Page 1 of 1

3 Replies - 493 Views - Last Post: 29 November 2009 - 12:06 PM Rate Topic: -----

#1 doc1984  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 14
  • Joined: 24-November 09

Thanks

Post icon  Posted 24 November 2009 - 04:30 PM

i have tried various codes and been all over the net i use vbulletin but upgraded to version 4 so the phrases have all changed so this is just a question before i start a code is there a way i can make one with out using vb phrases ie

posters id
post id


then when thanks button clicked give the persons id a thanks ie plus one i have tried many ways but cand seem to get anything to even start to work i have used auto_increment ect to try and get it to go up but i cant get it to grab user id from database and post id so the thanks dont go no where so now im lost for ideas any pointers would be a great help

Is This A Good Question/Topic? 0
  • +

Replies To: Thanks

#2 CTphpnwb  Icon User is online

  • D.I.C Lover
  • member icon

Reputation: 2889
  • View blog
  • Posts: 10,002
  • Joined: 08-August 08

Re: Thanks

Posted 24 November 2009 - 05:17 PM

Are you receiving any errors? Does this code not work that way you intended it? When asking for help there are a couple items that are vital in order for someone to properly help you:
  • Post the code you're having problems with
  • Post the exact error you're receiving, if you are receiving one
  • If no error explain what the code is doing versus what you want it to do
  • Post your question in the body of your post, not the description field

Was This Post Helpful? 0
  • +
  • -

#3 nick1200  Icon User is offline

  • Php Coder
  • member icon

Reputation: -19
  • View blog
  • Posts: 922
  • Joined: 21-March 09

Re: Thanks

Posted 25 November 2009 - 04:45 AM

ud have to use my sql for it
so when they click the button it adds 1 to lets say table thanks were username = $username
Was This Post Helpful? 0
  • +
  • -

#4 Cbeppe  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 31
  • View blog
  • Posts: 215
  • Joined: 16-September 09

Re: Thanks

Posted 29 November 2009 - 12:06 PM

About the user ID problem, I have been in that situation before. What solved it for me, was taking the $_SESSION['username'] variable and converting it to a $username. Try it out, maybe it works. I'm still very novice in PHP, so don't take it as a guarantee.

As for the thanks button, I would go with nick1200 's idea and use a coloumn of an SQL table for thanks, then updating it with every click on the "thanks" button.

I hope it helps.

Cbeppe
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1