473,386 Members | 1,823 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Form help using Html and php

nomad
664 Expert 512MB
Hello everyone.
I need some help with this it wried
I create a form which works on one site but not another site.
one that works
http://www.damonwongdesign.com/entry_form.htm
one that does not work
http://www.redlandsgottalent.com.au/entry_form.htm
I get this error
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@redlandsgottalent.com.au and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

here is my php code.
Expand|Select|Wrap|Line Numbers
  1. <?php
  2. // get posted data into local variables
  3. $EmailFrom = "Redlands Got Talent Show 2010";
  4. $EmailTo = "abc@example.com";
  5. $Subject = "Redlands Got Talent Show Entry Forum 2010";
  6. $name = Trim(stripslashes($_POST['name'])); 
  7. $birthdate = Trim(stripslashes($_POST['birthdate'])); 
  8. $school = Trim(stripslashes($_POST['school'])); 
  9. $address = Trim(stripslashes($_POST['address'])); 
  10. $postcode = Trim(stripslashes($_POST['postcode'])); 
  11. $email = Trim(stripslashes($_POST['email'])); 
  12. $telephone = Trim(stripslashes($_POST['telephone'])); 
  13. $group = Trim(stripslashes($_POST['group']));
  14. $song = Trim(stripslashes($_POST['song']));
  15. $dance = Trim(stripslashes($_POST['dance']));
  16. $Instrumental = Trim(stripslashes($_POST['Instrumental']));
  17. $description = Trim(stripslashes($_POST['description']));
  18. $other = Trim(stripslashes($_POST['other']));
  19. $release = Trim(stripslashes($_POST['release']));
  20. $payment = Trim(stripslashes($_POST['payment']));
  21. $credit = Trim(stripslashes($_POST['credit']));
  22. $namecard = Trim(stripslashes($_POST['namecard']));
  23. $cardnumber = Trim(stripslashes($_POST['cardnumber']));
  24. $date = Trim(stripslashes($_POST['date']));
  25. $tax = Trim(stripslashes($_POST['tax']));
  26.  
  27. // validation
  28. $validationOK=true;
  29. if (!$validationOK) {
  30.   print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">";
  31.   exit;
  32. }
  33.  
  34. // prepare email body text
  35. $Body = "Name(s): ";
  36. $Body .= $name;
  37. $Body .= "\n";
  38. $Body .= "Date(s) for Birth (in order): ";
  39. $Body .= $birthdate;
  40. $Body .= "\n";
  41. $Body .= "School: ";
  42. $Body .= $school;
  43. $Body .= "\n";
  44. $Body .= "Address: ";
  45. $Body .= $address;
  46. $Body .= "\n";
  47. $Body .= "Postcode: ";
  48. $Body .= $postcode;
  49. $Body .= "\n";
  50. $Body .= "Email: ";
  51. $Body .= $email;
  52. $Body .= "\n";
  53. $Body .= "Telephone: ";
  54. $Body .= $telephone;
  55. $Body .= "\n";
  56. $Body .= "Section your are entering: ";
  57. $Body .= $group;
  58. $Body .= "\n";
  59. $Body .= "Song: ";
  60. $Body .= $song;
  61. $Body .= "\n";
  62. $Body .= "Dance:";
  63. $Body .= $dance;
  64. $Body .= "\n";
  65. $Body .= "Instrumental: ";
  66. $Body .= $Instrumental;
  67. $Body .= "\n";
  68. $Body .= "Description: ";
  69. $Body .= $description;
  70. $Body .= "\n";
  71. $Body .= "Other/Novelty: ";
  72. $Body .= $other;
  73. $Body .= "\n";
  74. $Body .= "I agree to the use of photographs of me/us to be used in event publicity: ";
  75. $Body .= $release;
  76. $Body .= "\n";
  77. $Body .= "Payment type ";
  78. $Body .= $payment;
  79. $Body .= "\n";
  80. $Body .= "Credit Card information";
  81. $Body .= "Credit Card: "; 
  82. $Body .= $credit;
  83. $Body .= "\n";
  84. $Body .= "Name on Card: "; 
  85. $Body .= $namecard;
  86. $Body .= "\n";
  87. $Body .= "Card Number: "; 
  88. $Body .= $cardnumber;
  89. $Body .= "\n";
  90. $Body .= "Expirt Date: ";
  91. $Body .= $date;
  92. $Body .= "\n";
  93. $Body .= "I require a Tax Receipt: ";
  94. $Body .= $tax;
  95.  
  96. // send email 
  97. $success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>");
  98.  
  99.  
  100. // redirect to success page 
  101. if ($success){
  102.   print "<meta http-equiv=\"refresh\" content=\"0;URL=thanks.htm\">";
  103. }
  104. else{
  105.   print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">";
  106. }
  107. ?>
  108.  
If you need the htm code let me know I figure you can get it by using the source code on the page.

Many Thanks
damon
Feb 18 '10 #1
2 1361
Dormilich
8,658 Expert Mod 8TB
do you have a .htaccess file on the second server? does this happen with other .php files?
Feb 19 '10 #2
kovik
1,044 Expert 1GB
Your best bet is to look at the server logs. The message that you are getting is a default message used to hide the real error from the client. Your logs should give you a much more clear idea of what is going wrong, be it a problem with .htaccess, or a problem with server extensions.
Feb 19 '10 #3

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

Similar topics

2
by: Citoyen du Monde | last post by:
Trying to get some ideas on a simple javascript project (to teach myself the language). I want to develop a client-side vocabulary practice application that would allow users to enter their own...
4
by: Stuart Perryman | last post by:
Hi, I have the following code which works just fine in IE6 but not in Firefox. It is an extract of several table rows each with an individual form. It is generated by php. <form...
0
by: 42 | last post by:
I implemented a simple class inherited from Page to create a page template. It simply wraps some trivial html around the inherited page, and puts the inherited page into a form. The problem I...
4
by: Venus | last post by:
Hello, Thanks for your reply. I understand that a control can be created dynamically in several ways: 1) using StringBuilder 2) using Controls.Add 3) using ASP PlaceHolder But this is just...
3
by: Bill | last post by:
I'm using the POST method to submit a simple form html page with yes/no and checkbox fields to an asp response page which stores the values in a new dim string, then uses it to build a new table...
1
by: John Wolff | last post by:
I’m trying to upload a file to a Web Service. I have to submit the file using a standard HTML form with the <input type=“file” /tag. Ultimately, we are submitting the file from a Flash 8...
19
by: Coward 9 | last post by:
HI, I saw in an example hello.aspx, there is a <form tagbeing used like <form runat="server> I search all html tag references and could NOT find "runat" attributes for <formtag. which...
1
by: IframeLearner | last post by:
Hi , I am trying to upload a file from a parent.jsp using Iframes. From Parent page. I have to save Subject, Desc, File and file name. to upload the file i am using Iframe. I want the...
9
by: dhtml | last post by:
I have written an article "Unsafe Names for HTML Form Controls". <URL: http://jibbering.com/faq/names/ > I would appreciate any reviews, technical or otherwise. Garrett --...
5
by: maheswaran | last post by:
Hi all, My home page have login button to login the users. Am trying to use lightbox method in login screen. Using this when user click the loing button, login form will appear with lightbox effect...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.