javascript - Create a session when i select any option in select box using PHP? -
I am trying to create a session while selecting an option in a selection box but it is not working I can not even get the value from the selection box. I am using isset ($ _ POST ['SelectBoxName'])
, is there a choice?
I am trying to code below, but it is not working.
I already have one more session in the same program, will it be a problem? This is used for any other process, and I want to make another session for any other process, but both should be in the same program. Another session is working perfectly, but it is not.
& lt ;? Php echo " Select the name = 'Cart' attribute style = 'width: 50px;' Onchange = 'ajaxQuantityChange ()' "; {Foreach ($ value as $ key2 = & gt; $ value2) for {$ Q = 1; $ q "; // Make a session if (project $ ($ _ POST ['cartquantity'])) {$ _SESSION ['cartrint'] = $ _ POST ['cartrint']; }? & Gt;
This is the "ajaxquantitychange" function:
& lt; Script type = "text / javascript" & gt; Function Ajax QuantityChange () {var quantity; If (window.XMLHttpRequest) {volume = new XMLHttpRequest (); } And {quantity = new ActiveXObject ("Microsoft.XMLHTTP"); } Quantity.onreadystatechange = function () {if (quantity.readyState == 4 & amp; amp; amp; Quantity.status == 200} {document.getElementById ("Last Price"). InnerHTML = quantity.responseText; }} Quantity.open ("GET", "finalprice.php", is true); Quantity.send (); } & Lt; / Script & gt;
My complete code is in this link, please check it and someone can solve my question?
There is a problem with your line,
echo "& lt ; TD & gt; & lt; Select name = 'cart' validity style = 'width: 50px;' Onchange = 'ajaxQuantityChange ()' ";
You did not close the tag tag it should be
echo " & lt; Select name = 'cartwheat' style = 'width: 50px;' Onchange = 'ajaxQuantityChange ()' & gt; ";
Comments
Post a Comment