Author Topic: PHP Script  (Read 1398 times)

charlie1

  • Posts: 10
    • View Profile
PHP Script
« on: August 02, 2006, 12:19:23 pm »
Hi,

We currently operate a download portal and wanted to give clients an option to have their email address added to the database before downloading our product.  We need to run a PHP script upon the signup success by passing a variable to that script.  Is this possible?  We have done the script but upon completion of the signup process, the download would not start. So any information or tips that you could give us would be greatly appreciated.

Thanks!

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
PHP Script
« Reply #1 on: August 04, 2006, 02:29:06 pm »
Hi Charlie,

This one could be a little tricky.  Why is it that you must run the PHP script?  Are you customizing each download?  There is a file "signup-xtra.php" which can be found in the ListMail/xtra folder.  When this file is moved to the main ListMail folder it, and any code contained within it, will be executed on every signup and optionally during import and manual addition.

If the email address is _optional_ I don't know if you should be using ListMail's signup.php as the target for the form POST because it expects and requires the email address.  You might instead use a custom script and use that to insert into ListMail if the email address is provided.  This is as easy as a single PHP line as follows:
Code: [Select]
fopen("http://example.com/mail/signup.php?email=$email&fname=".urlencode($firstname));
Regards
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting