Page 1 of 1

PHP form editing sql without any page reload/load

Posted: Tue Aug 26, 2008 12:36 pm
by ohgodpleasehelp
I am making a website which indexes videos from youtube into categories and then lets you view them at random based on those categories. Since I am allowing users to upload videos I am, of course, expecting some videos to be in the wrong category or to be removed by youtube. For this reason I want to make a 'report' button.

I figured out how to use the type hidden which allows for me to simply pass the variable of 1 (reported videos will be flagged as 1 so that I can easily find and edit them using an admin page) but I want to do this without any page load/reload on the users end. To make it as clear as possible here is a step by step breakdown of what I hope to be able to do.

1. User views a video. Said video is broken/tagged wrongly/etc. User hits the report button.
2. By hitting the report button that video has its value changed from 0 to 1 in the database.
3. The text "Thanks!" or something appears next to the report button to indicate that all has gone well and that the user can carry on knowing that he/she has reported it successfully.

What I do not want to have happen is any kind of page load or reload on the users end. Is this possible? If so which function(s) should I look into? Thanks!

Re: PHP form editing sql without any page reload/load

Posted: Tue Aug 26, 2008 2:37 pm
by Ziq
Look at AJAX technology.

Maybe you will be interested JsHttpRequest