Hi Guys,

Can't seem to get my head around this one. I need to send a bunch of variables to php so that i can store the values in a database, but i just can't figure out a way to do that. Pls help. here's a little code

$( "#droppable2" ).droppable({
	activeClass: "ui-state-hover",
	hoverClass: "ui-state-active",
	accept: "#draggable3",
	drop: function( event, ui ) {
		var jdc = $(this).attr("id"); //I need to post this variable
		$( this )
			.addClass( "ui-state-highlight" )
			var x = ui.helper.clone();   
			var jdi = $("img").attr("id");//I need to post this variable
			$(this).droppable( 'disable' );
			$("span").click(function (){

I can post more code if needed. I really need this.

Thanks in advance

Recommended Answers

What doesn't work? Take a look at $.ajax and $.post.

Jump to Post

All 3 Replies

What doesn't work? Take a look at $.ajax and $.post.

Thanks for the response twiss.

Perhaps my need was not stated correctly. What I want to do is to save or be able to access those variables later on in the script, but because they are local variables... I am having problems calling them later on in the script.

In a nutshell, I want to be able to call up local variables from other three identical functions and send them all together later on. If that makes sense.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.