Re: How do I Pass variable from VB to PHP?
| From: | Andy Hoffman | Date: | Thu, 09 Nov 2000 18:29:58 +0000 |
| Subject: | Re: How do I Pass variable from VB to PHP? | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-3767@lists.php.net to get a copy of this message | ||
"Williams, Dewey" wrote:
> I am trying to pass data from VB to a PHP file that will email the user a
> copy of form information. I am just beginning to use PHP and can't rewrite
> the whole program to be PHP only.
>
> How can I call a PHP file from VB and send the necessary data from VB
> variables to PHP?
What exactly do you mean by "call a PHP file from VB"? Do you mean VB-Script
running within a web browser, such as ASP? A VB-programmed Win32 application?
VB ActiveX component on the server?
The only way you could get a VB standalong app to call a php-script is by
embedding a php interpreter into your application, and that's still no
guarentee that you could get the mail() function to work. If, on the other
hand, you're trying to call a php-script from within an ASP page, you could
simply redirect the browser to this page, passing variables on the url line.
Some ASP code (sorry guys)... also note that I'm a bit rusty at ASP by now :)
<%
Response.Redirect("<pathtophpscript>/emailscript.php?name="
&Request.Form("UserName")&"&email="&Request.Form("email"))
%>
--
Andy Hoffman
Web Developer
Bristol-Myers Squibb
email: andy.hoffman@bms.com