I went ahead and tried it - it works beautifully, where the title does show
up perfectly when you arrive at the form.

I filled out the form both to test the actual email body and the resulting
html page once you've filled out the form and submitted.

The $title variable does not show up in either the email body nor in the
resulting page (the thank you for filling out this form page).

While I can make the resulting page very generic by not adding the $title
anywhere there, but the email body must contain the $title variable. I'm
thinking maybe I should be adding the hidden form field for the $title?

Here's the mail code:

mail("$recipientname <$final_recipient>","$form[subject]","$form[first_name]
$form[last_name] ($form[email]) send the following message to $recipientname
($final_recipient) : \n\n $form[message]\n\n Name: $form[first_name]
$form[last_name] \n Event: $event \n Address: $form[address] \n
City/Province: $form[city], $form[province] \n Phone: $form[areacode]
$form[part1]-$form[part2] \n Email: $form[email] \n Subject: $form[subject]
\n", "From: $form[first_name] $form[last_name] <$form[email]>\nReply-To:
$form[first_name] $form[last_name] <$form[email]>\nContent-type:
text/plain\nX-Mailer: PHP/" . phpversion());

"Martin Towell" <[EMAIL PROTECTED]> wrote in message
> sure - do exactly as you described.
> just because a variable is appended to a url, doesn't mean it HAS to be
> in an SQL statement. It can be used for anything you like - even
> :)
> -----Original Message-----
> From: lmlweb [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, April 02, 2002 2:56 PM
> Subject: [PHP] Can I use variable appended to the end of a link if I'm
> not using it for SQL query?
> For example, on a page, I have this link:
> <a href="http://www.website.com/register.html?select=$title";>$title</a>
> where
> $title is whatever the database spits up on a previous query. Now I want
> be able to carry that $title onto the next page, which is a form mail for
> registering for the events, without having to use database. Basically I
> to be able to set the form up so it says:
> To register for $title, please fill out the form:
> who: ____
> what: _____
> where: _____
> [submit] [reset]
> and when it's submitted the mail() function will have an subject heading
> that consits of "$title Registration"
> is that possible?
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to