Coding help

Hello I have no knowlege in JS and I need your help

I have this code:

Code:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Setting cookie and passing to other page in url</title>

    <script language="javascript" type="text/javascript">
        var i = 0;
        var ids = new Array();

        function setCookie(c_name) {
            c_name += "[]" + i++;
            ids[i] = c_name;
            var value = document.getElementById("i1").value;
            document.cookie = c_name + "=" + escape(value);
        }

        function getVarNPost() {
            var valuestoPost = "";
            for (x in ids) {
                c_start = document.cookie.indexOf(ids[x] + "=");
                if (c_start != -1) {
                    c_start = c_start + ids[x].length + 1;
                    c_end = document.cookie.indexOf(";", c_start);
                    if (c_end == -1) c_end = document.cookie.length
                    valuestoPost += ids[x] + "=" + unescape(document.cookie.substring(c_start, c_end)) + "&";
                }
            }
            window.location = "http://www.classimoveisrn.com/hebrew/js_test.php?" + valuestoPost;

        }
    </script>

</head>
<body>
    <form id="f1">
    <input type="text" id="i1" />
    <input type="button" id="submit" value="submit" onclick="setCookie('id')" />
    </form>
    <input type="submit" id="post" value="submit" onclick="getVarNPost()" />
</body>
</html>

this JS eventually produces this link

I need it to create a link from type array to be able to GET it from the link with PHP , I need the link to look like that :

It mean NO # after the ID var’ In order to use this ;

Code:


$ids = array_map('intval', $_GET['ids']);
$sql = "SELECT * FROM foo WHERE id IN (" . implode(',', $ids) . ")";

Any help ?

People will often not bother to respond to double-posted threads as an answer may have been given in the other forum.