I have a little problem that I just can't get to work.

I want to send a URL line from VB6 in an application that I have written to
populate a
three field form on one of my www sites
(http://arthurbard.com/testarea/AutoPost.php) AND post it i.e. populate the
three fields and then simulate clicking on the submit button. I can send a
URL line from VB6 or directly from a browser line and fully populate the
form but do you think I can get it to post without clicking the button....
can I heck!!!!

I can call the form and populate the fields with the following line as the
URL...

http://arthurbard.com/testarea/AutoPost.php/?sender_name=Arthur&sender_email
=me@work&message=Hello.


This is the server side code......


############################################################
<HTML>
<HEAD>
<TITLE>Courier Delivery Feedback Form</TITLE>
</HEAD>
<BODY>

<?

$form_block = "

<FORM METHOD=\"post\" ACTION=\"$PHP_SELF\">

<P><strong>User Name:</strong><br>
<INPUT type=\"text\" NAME=\"sender_name\" VALUE=\"$sender_name\"
SIZE=30></p>

<P><strong>Your E-Mail Address:</strong><br>
<INPUT type=\"text\" NAME=\"sender_email\"  VALUE=\"$sender_email\"
SIZE=30></p>

<P><strong>Message/Problem:</strong><br>
<TEXTAREA NAME=\"message\" COLS=30 ROWS=5
WRAP=virtual>$message</TEXTAREA></p>

<INPUT type=\"hidden\" name=\"op\" value=\"ds\">

<P><INPUT TYPE=\"submit\" NAME=\"submit\" VALUE=\"Send This Form\"></p>

</FORM>

";

if ($op != "ds") {

 // they need to see the form
 echo "$form_block";

} else if ($op == "ds") {

 if ($sender_name == "") {
  $name_err = "<font color=red>Please enter user name!</font><br>";
  $send = "no";
 }

 if ($sender_email == "") {
  $email_err = "<font color=red>Please enter your e-mail
address!</font><br>";
  $send = "no";
 }

 if ($message == "") {
  $message_err = "<font color=red>Please enter a message!</font><br>";
  $send = "no";
 }

 if ($send != "no") {

  // it's ok to send!
  $msg = "AutoPost Report\n";
  $msg .= "Sender's Name:    $sender_name\n";
  $msg .= "Sender's E-Mail:  $sender_email\n";
  $msg .= "Message:          $message\n\n";

  $to = WhoItsTo@TheirISP;
  $subject = "AutoPost Response";
  $mailheaders = "From: CourierDelivery@MyISP\n\n";
  $mailheaders .= "Reply-To: $sender_email\n\n";

  mail($to, $subject, $msg, $mailheaders);
  echo "<P>Mail has been sent!</p>";

 } else if ($send == "no") {

  echo "$name_err";
  echo "$email_err";
  echo "$message_err";
  echo "$form_block";

 }

}

?>

</BODY>
</HTML>
</font></font>
########################################################################

What do I need to change in the following line to make the form submit/post
or do I need to change the code in my form.  I can't use the JavaScript
onLoad() event handler as I will be calling from VB6.

http://arthurbard.com/testarea/AutoPost.php/?sender_name=Arthur&sender_email
=me@work&message=Hello.

I have tried other Newsgroups without success so thought that its about time
to try the experts.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to