Welcome to WebmasterWorld Guest from 54.167.83.224

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

send to database on click

     
12:42 pm on Oct 25, 2008 (gmt 0)

Junior Member

5+ Year Member

joined:Aug 25, 2007
posts: 94
votes: 0


Hello,
I got a list of keywords on a page and i want to send a keyword to a database only if a user clicks on it.
Can i do it with php only or i need to add javascript for that ?
How can i perform that ?
thanks
hanyaz
1:00 pm on Oct 25, 2008 (gmt 0)

Moderator from GB 

WebmasterWorld Administrator brotherhood_of_lan is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Jan 30, 2002
posts:4842
votes: 1


I assume you don't wan't the page to reload, otherwise you could use a form with a submit button(s)?

[edited by: brotherhood_of_LAN at 1:01 pm (utc) on Oct. 25, 2008]

5:29 am on Oct 26, 2008 (gmt 0)

Junior Member

5+ Year Member

joined:Nov 3, 2007
posts:131
votes: 0


I'm pretty sure you'll have to add Javascript for that.

You need to start using AJAX if you want to interact to your Database without refreshing the page. I'd start using a Javascript AJAX framework if I were you.

Personally, I like Prototype.

7:27 am on Oct 26, 2008 (gmt 0)

Junior Member

5+ Year Member

joined:Aug 25, 2007
posts: 94
votes: 0


hello,
ajax would keep the visitor clicking on the same page, what i am actually looking for is when the visitor clicks :
1-the word is sent & stored into mysql
2-the visitor is redirected to a result page containing a list of results related to the word he clicked on.

i think in this case perhaps javascript would be more appropriate.
rgds

6:41 pm on Oct 26, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member dreamcatcher is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 30, 2003
posts:3719
votes: 0


Nope, just use PHP. I believe the header [uk.php.net] function is what you need.

dc

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members