Jump to content

Passing a Variable via URL to a Custom Script


foochuck

Recommended Posts

I'm using a PHP Form Mailer Script - you might have heard of it:

 

http://www.dagondesign.com/articles/secure-php-form-mailer-script/

 

I'm trying to pass a variable into this script. Here is the information that the form mailer script provides for this process:

 

Passing values to the form

 

    To allow values to be passed directly to the form, all you have to do is change all references of $_POST to $_REQUEST (The REQUEST superglobal contains the values of both POST and GET items)

 

What I'm trying to do is pass a variable like so:

 

http://www.mywebsite.com/mypage.php?listingid=001

 

I've tried putting this inside of the formmailer.php page:

 

$listingid = $_REQUEST['listingid'];

$email_subject = 'My Listing #' . $listingid;

 

However I can't get the 001 to work in the final email in place of $listingid .

 

Can anyone give me some suggestions on how to accomplish this?

 

Thanks

 

FOO

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.