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)
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)
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)
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)
Nope, just use PHP. I believe the header [uk.php.net] function is what you need.