I designed a website for my husband, but I'm having trouble getting the submit button to work the way I want it. I want it to send the customers information to our email address and then to a thank you page. I've been able to get it to send the information to our email address but it doesn't do anything else. I've tried looking on the web for code that will do this, but I don't understand what information goes where. It took quite a while for me to figure out how to setup the button to sent the information to our email address, but that's as far as I've been able to go.

I've tried a redirect code, but the only way I could get it to work is if a set a timer to it. But I don't want to go that way, because what if the customer isn't finish writing yet and then they get redirected before their done. So that didn't work. When I tried it without the timer, nothing happened.

Right now when the customer clicks the submit button, it sends the information to our email address, but nothing changes on the screen. So the customer thinks nothing happen, so they click it again. Some times we get several of the same message.

I've looked at other websites and I see where they used a CGI file. I don't know how to write CGI code. From what I've read it's similar to Pearl. Well I don't know Pearl either.

Can we see some code please?

could you please help me out the coding of submit button you used plaese its urgent

I designed a website for my husband, but I'm having trouble getting the submit button to work the way I want it. I want it to send the customers information to our email address and then to a thank you page. I've been able to get it to send the information to our email address but it doesn't do anything else. I've tried looking on the web for code that will do this, but I don't understand what information goes where. It took quite a while for me to figure out how to setup the button to sent the information to our email address, but that's as far as I've been able to go.

I've tried a redirect code, but the only way I could get it to work is if a set a timer to it. But I don't want to go that way, because what if the customer isn't finish writing yet and then they get redirected before their done. So that didn't work. When I tried it without the timer, nothing happened.

Right now when the customer clicks the submit button, it sends the information to our email address, but nothing changes on the screen. So the customer thinks nothing happen, so they click it again. Some times we get several of the same message.

I've looked at other websites and I see where they used a CGI file. I don't know how to write CGI code. From what I've read it's similar to Pearl. Well I don't know Pearl either.

Never saw code from the original poster. if you are attempting the same thing - and have ANY code, lets have a look! okay?

-chrisv

To make a Perl script display a page you have already created, do this:

open(file1, "thanks.html");
@data = <file1>;
close(file1);
$page = join("", @data);
print "Content-type: text/html\n\n$page";

Just make sure your thanks page has a link for the user to get back to the rest of your site.

Steven.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.