Hi there,

I am trying to build a function getcart(); that submits the form when clicked through ajax. The form is sent in GET format to cart.inc.php and turns the GET into SESSIONS and does math. The problem Im having is the variables are never making it to cart.inc.php. I think it has to do with my javascript function not sending the data. Any help or a push in the right direction would be helpfull Ill post my code below


Heres the page im working on http://worcesterwideweb.com/topnordic/

and heres my function

 function getcart() {
$.ajax({url: "cart.inc.php", data: $(this.elements).serialize(), success: function(response){$("#message").html(response);}, dataType: "html"});
  var url = "cart.inc.php?" + "ms=" + new Date().getTime();
  $("div#cart").load(url);

return false;

}

and on a side note heres my php to show it should be working

<?php session_start();
$_SESSION['mbit'] = $_GET['mbit'];
$_SESSION['obit'] = $_GET['obit'];

$total = $_SESSION['mbit'] + $_SESSION['obit'];
echo 'total:';
echo $total;


?>

Reply via email to