RE: [PHP] Can I use variable appended to the end of a link if I'm not using it for SQL query?

2002-04-01 Thread Martin Towell

sure - do exactly as you described.

just because a variable is appended to a url, doesn't mean it HAS to be used
in an SQL statement. It can be used for anything you like - even ignored...
:)


-Original Message-
From: lmlweb [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 02, 2002 2:56 PM
To: [EMAIL PROTECTED]
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 to
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 want
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




Re: [PHP] Can I use variable appended to the end of a link if I'm not using it for SQL query?

2002-04-01 Thread lmlweb

Hi,

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
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 sure - do exactly as you described.

 just because a variable is appended to a url, doesn't mean it HAS to be
used
 in an SQL statement. It can be used for anything you like - even
ignored...
 :)


 -Original Message-
 From: lmlweb [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, April 02, 2002 2:56 PM
 To: [EMAIL PROTECTED]
 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
to
 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
want
 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




RE: [PHP] Can I use variable appended to the end of a link if I'm not using it for SQL query?

2002-04-01 Thread Martin Towell

yep - definately need that hidden field, just a simple line will do
(normally)

input type=hidden name=title value=?= $title; ?

you'll have to do funky stuff if there's quotes in the title or anything
that gets escaped, like ', and \, etc


-Original Message-
From: lmlweb [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 02, 2002 3:33 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Can I use variable appended to the end of a link if
I'm not using it for SQL query?


Hi,

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
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 sure - do exactly as you described.

 just because a variable is appended to a url, doesn't mean it HAS to be
used
 in an SQL statement. It can be used for anything you like - even
ignored...
 :)


 -Original Message-
 From: lmlweb [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, April 02, 2002 2:56 PM
 To: [EMAIL PROTECTED]
 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
to
 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
want
 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

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




Re: [PHP] Can I use variable appended to the end of a link if I'm not using it for SQL query?

2002-04-01 Thread lmlweb

No, not quite there yet - I've done the following and it still doesnt' show
up.

Here's what I have in my hidden input:

input type=hidden name=event value=?php echo $event; ?

and modified the Mail form:

$event = addslashes($event);  // to escape any funky stuff

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: $form[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
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 yep - definately need that hidden field, just a simple line will do
 (normally)

 input type=hidden name=title value=?= $title; ?

 you'll have to do funky stuff if there's quotes in the title or anything
 that gets escaped, like ', and \, etc


 -Original Message-
 From: lmlweb [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, April 02, 2002 3:33 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] Can I use variable appended to the end of a link if
 I'm not using it for SQL query?


 Hi,

 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
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  sure - do exactly as you described.
 
  just because a variable is appended to a url, doesn't mean it HAS to be
 used
  in an SQL statement. It can be used for anything you like - even
 ignored...
  :)
 
 
  -Original Message-
  From: lmlweb [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, April 02, 2002 2:56 PM
  To: [EMAIL PROTECTED]
  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
 to
  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
 want
  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



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