hello everyone,
I have an email form.
I can type in all my information, and when I hit submit the proper information goes to the right person but right now I am just using another blank browser window to display the "Thank you - email has been sent".
What I want to do is to have it send and then print the "Thank you - email has been sent" to my pages with the right header and footer. I do this through classes.
ie) Class script{
var $emailto;
var $emailMessage;
function script(){
$this->showheader();
$this->executeScript();
$this->showFooter();
}
function executeScript(){
$to=$this->emailto;
// my email statement would go here
}
}
My problem is that the values never get assigned in this class for some reason. I have this code in my submit file:
reset($HTTP_POST_VARS);
while (is_array($HTTP_POST_VARS) && list($k,$v)=each($HTTP_POST_VARS)) {
$fieldName[]=$k;
$fieldValue[]=$v;
print"field:$k, $v"; //this prints properly
}
$script=new Script();
$script->emailto=$emailto;
$script->emailMessage=$emailMessage;
For some reason this is not assigning properly. However if I print"email:$emailto, message:$emailMessage";
it will print the values.
Does anyone have any ideas why this is happening?? Any help is greatly appreciated.
Thanks for your time.