Forum Moderators: coopster
i am trying to pass the name filled in on a form to a thanks.php page which is redirected after the form has been sent to FormMail.pl
Can i do this or do i need to post to a php page rather than the perl script first? is this my problem?
Thanks in advance for any help.
hope this clarifies what i am trying to do.
<form method="post" action="formmail.pl">
lorax is suggesting you modify the formmail.pl script to run your php code when it is completed. Here is another thread similar to what is being described here [webmasterworld.com...]
but probably isn't going to help you out.
Otherwise, you could change your form POST action to run your PHP script instead and post that data to the formmail.pl script from your PHP code.
I'm not sure why you mention sessions. The vars you send to thankyou.php from the PERL script shouldn't pose a problem. How are you sending them along?
Regards -- coopster
<input type=hidden name="redirect" value="../thanks.php">
this is just a self made page that replaces the default thankyou text created.
<form action="cgi-bin/FormMail.pl" method="POST" name="enquire" id="enquire">
My form is actioned like this.
I have read alot of topics now and tbh am not that much the wiser. I mentioned sessions because i thought that on the form.htm i could save the entered name into a cookie or whatever needed.
am i missing something here or have u already told me what I need to do?
<input name="realname" type="text" id="realname" size="30" maxlength="60">
This is the field i want to display on the thanks.php
Maybe I am looking to hard into this.. sorry to be a nuisance :(
Perhaps someone else might have a better direction to head in. Have you read through coopster's suggested thread?
# If redirect option is used, print the redirectional location header. #
if ($Config{'redirect'}) {
print "Location: $safeConfig{'redirect'}\n\n";
}
Therefore, no variable data is being passed to your php script. You would either have to modify the formmail.pl script or roll your own PHP script to handle the action.
3. The redirect command won't work.
There was a bug in older versions of this script and it has been fixed. Please download the latest version if you are using an old one.