使用cURL将表单数据发布到简单表单

I have a simple example form myForm.php

<html>
<head>
<title>Curling and Enjoying?</title>
</head>
<body>
<form action="print.php" method="post">
   <p>First name: <input type="text" name="firstname" /></p>
   <p>Last name: <input type="text" name="lastname" /></p>
   <input type="submit" name="submit" value="Submit" />
</form>
</body>
</html>

And the a php script which handles the POST action by simply printing the values entered in the two inputs on the previous page, print.php

<?php
   echo("First name: " . $_POST['firstname'] . "<br />
");
   echo("Last name: " . $_POST['lastname'] . "<br />
");
?>

If possible, how can I use cURL to get a correct HTML response by submitting arguments to the server when posting data to the form

When I run the command:

$ curl -d "firstname=Ray&lastname;=Charles" http://mysiteurl.com/myForm.php

I get only the HTML from myForm.php

The submit target should be print.php but not myForm.php.

$ curl -d "firstname=Ray&lastname=Charles" http://mysiteurl.com/print.php