Hey all,
I am trying to put up a contact form that I have previously used but it doesn't seem to be passing the variable along. Below are my steps:
1. Set up user tag {contact_submitted}
$SiteName = "http://www.sitename.com";
$SiteEmail = "admin@site.com";
$ip = $REMOTE_ADDR;
echo 'Thankyou $UserName for your message.';
$AdminMessage .= "$UserName, Submitted the following Information:\n\n";
$AdminMessage .= "Full Name: $UserName\n";
$AdminMessage .= "E-mail: $UserEmail\n";
$AdminMessage .= "Comments: $UserComments\n\n";
mail("$SiteEmail", "$SiteName", $AdminMessage, "From: $UserEmail");
2. Set form up with following:
Name:
Email:
Message:
3. Insert user tag into contact_submitted.
Basically none of the information is being passed to the Contact Submitted page. I am going to most likely try and use the Form module but was wondering why it was wasn't working for future reference.
Cheers
Damian
Custom Tag
Re: Custom Tag
You're making an assumption that register_globals is on, which it most likely is not, since the default in php these days is to have it off.
So, instead of
do:
Plus this way is a lot safer. You can sanitize the input without worrying that someone is going to hack around it.
Hope that helps!
So, instead of
Code: Select all
$AdminMessage .= "$UserName, Submitted the following Information:\n\n";
Code: Select all
$AdminMessage .= $_POST['UserName'].", Submitted the following Information:\n\n";
Hope that helps!

