S_Hannah Posted May 8, 2012 Posted May 8, 2012 Hi, At present the PHP page reads the MySQL data and prints on screen and if the result if 'FREE' it shows a clickable image for the user to book. I am looking for something that allows the user to drag the result they fund to another location with in the table. I.e. user has box 1 filled with their name, they can drag their name to box 9 and it saves it, so they can go back on the it will be their. If anyone knows where I can firn maybe a tutorial, or guide to get started with this, as I have looked and cannot see anything. Cheers. Stu
InterwebsGuy Posted May 9, 2012 Posted May 9, 2012 You need to read up on either some JavaScript (jQuery is a good call for this) or HTML 5 drag and drop. PHP has nothing to do with the dragging and dropping mark up, that will just handle the POST/GET requests from the JS. Google it for a gazillion tutorials. 1
zag Posted May 9, 2012 Posted May 9, 2012 You can do this with HTML5 now http://html5demos.com/drag 1
S_Hannah Posted May 10, 2012 Author Posted May 10, 2012 Hi, Thank you for the responses, it has given me an idea of where to start on where to look. The reason I asked about its intergration into PHP was because our current booking system is driven by this and runs the mysql queries and display through PHP. Thanks again, Stuart
InterwebsGuy Posted May 11, 2012 Posted May 11, 2012 Hi, Thank you for the responses, it has given me an idea of where to start on where to look. The reason I asked about its intergration into PHP was because our current booking system is driven by this and runs the mysql queries and display through PHP. Thanks again, Stuart No problem. PHP would work fine, as would any server side language, it doesn't really matter what you use as generally when the item has been 'dropped', the d&d syntax will send a POST or GET request off to a script - PHP if you like - to handle the action. How the PHP script acts is entirely up to you, as it is just like handling any other form submission really. There is more to it, but in a nutshell that is how something like that works.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now