We help IT Professionals succeed at work.

Get posted variables with http request

hasozduru
hasozduru asked
on
708 Views
Last Modified: 2008-02-01
Hi

I have 3 files. I am trying to post variables with post so I can process them with http request. I couldn't manage to get posted variables. Here is my files.

presentation.php
-------------------
$html .= "<form action=addRemoveMembers.php method=post id=theHttpForm name=theHttpForm>";
$html .= "<input type=hidden id=id name=id value=$value>";
$html .= "<td width=60><input type=\"button\" value=\"   >>   \" name=\"B1\" onClick=\"javascript:document.getElementById('switch').value=0; addRemoveMembers('$resource','../$resource/getSearchResults.php?module=$resource&id=$value&start=0&side=0','$foreign_field','$value','0');
getContent('../$resource/getSearchResults.php?module=$resource&id=$value&start=0&side=0','member');\">

functions.js
-------------
function addRemoveMembers(module, url, foreign_field_value, value, side) {
      xmlhttp=setHTTPObject();
      var url = "../"+module+"/addRemoveMembers.php";
      xmlhttp.open("POST", url, false);
      xmlhttp.send(null);
}

addRemoveMembers.php
-----------------------------
$db->createSequence("linfo_group_group_sequence");
$new_id=$db->nextId("linfo_group_group_sequence");
$query = "INSERT INTO linfo_group_group (id, group_id, group_member_id)      VALUES($new_id, $_POST[id], 22);";
$result = $db->query($query);
Comment
Watch Question

Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
I do not wish to create string with var poststr. I just would like to get all the posted variables as an array like normal way but with http request.

Thanks
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.