Welcome to WebmasterWorld Guest from 54.160.163.163

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

send to database on click

     

hanyaz

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

5+ Year Member



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

brotherhood of LAN

1:00 pm on Oct 25, 2008 (gmt 0)

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



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]

cosmoyoda

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

5+ Year Member



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.

hanyaz

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

5+ Year Member



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

dreamcatcher

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

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



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

dc

 

Featured Threads

Hot Threads This Week

Hot Threads This Month