heres my forum
Code
<form action="clientrecordservice.php" method="POST">
<input type="text" name="description" value="" />
<input type="submit" value="update record by id" />
</form>
heres my guzzle code
Code
require_once('vendor/autoload.php');
$client = new GuzzleHttp\Client();
$url = "http://localhost/project4/TaskManager_service.php";
/*
creates a new record
*/
try
{
$response = $client->request("POST", $url,
[
'form_params'=>
[
'description' => "$[B]description[/B]",[/COLOR]
]
]);
$response_body = $response->getBody();
}
catch (RequestException $ex)
{
echo "HTTP Request failed\n<br/><pre>";
print_r($ex->getRequest());
echo "</pre>";
if ($ex->hasResponse())
{
echo $ex->getResponse();
}
}
echo "created a new record<br/>";
echo "<pre>";
echo $response_body;
echo "</pre>";
how the crap do i pass the forum input into that. the record is still being added blank. i can manually do like 'some input' and it will input but it has to come from that forum
This post was edited by jsbb on Apr 11 2017 12:38pm