By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,986 Members | 1,487 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,986 IT Pros & Developers. It's quick & easy.

Submit button!!!

P: 34
Hello everyone, I'm in need of some help. I created a simple customer information page requesting name, address, etc., with a submit button. That when clicked it will give you a Thank you statement. But I cannot seem to get it to work right. Can somone give me some pointers.
Feb 18 '08 #1
Share this Question
Share on Google+
10 Replies


eWish
Expert 100+
P: 971
We can not help without seeing the markup. It may not even be an HTML or CSS issue.

--Kevin
Feb 18 '08 #2

nomad
Expert 100+
P: 664
Hello everyone, I'm in need of some help. I created a simple customer information page requesting name, address, etc., with a submit button. That when clicked it will give you a Thank you statement. But I cannot seem to get it to work right. Can somone give me some pointers.
question for you:
What actions do you have for your submit button.
Are you emailing the info or is it going into a db. (database)
what part are you having problems are.
click the submit button then it redirect you to the thank you page.
What languages are you using html and php?

nomad
Feb 19 '08 #3

P: 34
question for you:
What actions do you have for your submit button.
Are you emailing the info or is it going into a db. (database)
what part are you having problems are.
click the submit button then it redirect you to the thank you page.
What languages are you using html and php?

nomad
I'm using html. I would like for it to say thank you when it is done. If I understand it correctly I need to save it as a link that the button points to right, so when it is clicked it will know to open that link?
Feb 19 '08 #4

P: 34
We can not help without seeing the markup. It may not even be an HTML or CSS issue.

--Kevin
Understood will post it once I get off work.
Feb 19 '08 #5

nomad
Expert 100+
P: 664
I'm using html. I would like for it to say thank you when it is done. If I understand it correctly I need to save it as a link that the button points to right, so when it is clicked it will know to open that link?
You are some what right..
When you click the submit button it does two things.
1. send the info the client input ie email, db
2. then it redirect to a thank you page.

Might look like this on your php page
Expand|Select|Wrap|Line Numbers
  1. // send email 
  2. $success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>");
  3. // redirect to success page 
  4. if ($success){
  5.   print "<meta http-equiv=\"refresh\" content=\"0;URL=thankscontact.htm\">";
  6. }
  7. else{
  8.   print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">";
  9. }
  10.  
nomad
Feb 19 '08 #6

P: 34
Hey is what I have:

Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  2. <html>
  3. <!--  Created with the CoffeeCup HTML Editor 2007  -->
  4. <!--           http://www.coffeecup.com/           -->
  5. <!--        Brewed on 2/18/2008 4:33:53 PM         -->
  6. <head>
  7.   <title>Customer Information</title>
  8. </head>
  9. <body>
  10. <form>
  11. First name: 
  12. <input type="text" name="firstname" size="20">
  13. <br>
  14. Last name: 
  15. <input type="text" name="lastname" size="20">
  16. <br>
  17. Address:
  18. <input type="text" address="address" size "50">
  19. <br>
  20. City:
  21. <input type="text" city="city" size="20">
  22. <br>
  23. State:
  24. <input type="text" state="state" size="2">
  25. <br>
  26. Zip Code:
  27. <input type="text" zip code="zipcode" size="5">
  28. <br>
  29. <input type="submit" value="Submit Button">
  30. </form>
  31. </body>
  32. </html>
Feb 19 '08 #7

eWish
Expert 100+
P: 971
Your basic problem is this that you are not sending the data anywhere. This is an example of what the first line should look like.

Expand|Select|Wrap|Line Numbers
  1. <form name="Some Name" method="POST" action="some_server_side_script.pl">
You will need a server-side language to achieve what you want. Therefore, this is not an HTML or CSS issue.

HTML Forms and Inputs

--Kevin
Feb 19 '08 #8

P: 34
Thanks for the help!
Feb 19 '08 #9

P: 34
Hey thanks again eWish changing the first line of my code did it.
Feb 19 '08 #10

eWish
Expert 100+
P: 971
Good glad to hear it!
Feb 20 '08 #11

Post your reply

Sign in to post your reply or Sign up for a free account.