User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Perl section within the Software Development category of DaniWeb, a massive community of 402,372 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,108 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Perl advertiser: Programming Forums
Views: 5748 | Replies: 4
Reply
Join Date: Sep 2006
Posts: 7
Reputation: Little E is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Little E Little E is offline Offline
Newbie Poster

Question submit button code

  #1  
Sep 25th, 2006
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.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jul 2005
Location: St. Louis, MO
Posts: 8
Reputation: vonfeldt is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
vonfeldt vonfeldt is offline Offline
Newbie Poster

Re: submit button code

  #2  
Sep 27th, 2006
Can we see some code please?
Reply With Quote  
Join Date: Nov 2006
Posts: 2
Reputation: rickymartin001 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
rickymartin001 rickymartin001 is offline Offline
Newbie Poster

Re: submit button code

  #3  
Nov 15th, 2006
could you please help me out the coding of submit button you used plaese its urgent




Originally Posted by Little E View Post
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.
Reply With Quote  
Join Date: Jul 2005
Location: St. Louis, MO
Posts: 8
Reputation: vonfeldt is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
vonfeldt vonfeldt is offline Offline
Newbie Poster

Re: submit button code

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

-chrisv
Reply With Quote  
Join Date: Jun 2006
Location: UK (Bristol)
Posts: 225
Reputation: Mushy-pea is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 1
Mushy-pea's Avatar
Mushy-pea Mushy-pea is offline Offline
Posting Whiz in Training

Re: submit button code

  #5  
Nov 18th, 2006
To make a Perl script display a page you have already created, do this:

  1. open(file1, "thanks.html");
  2. @data = <file1>;
  3. close(file1);
  4. $page = join("", @data);
  5. 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.
Hello, you're through to Steven on the BT Business technical help desk. Could I take your broadband telephone number please?
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Perl Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the Perl Forum

All times are GMT -4. The time now is 12:26 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC