Ver Mensaje Individual
  #3 (permalink)  
Antiguo 12/02/2010, 10:23
Avatar de ccs_diego
ccs_diego
 
Fecha de Ingreso: diciembre-2008
Ubicación: Bogota
Mensajes: 40
Antigüedad: 15 años, 11 meses
Puntos: 1
Respuesta: Problemas con formulario

Lo que pasa es que son varios archivos ...

Este es el HTML


Código HTML:
<!--
/************* Ajax Contact Form 1.0 *****************************/
/*
Released by AwesomePHP.com, under the GPL License, a
copy of it should be attached to the zip file, or
you can view it on http://AwesomePHP.com/gpl.txt
*/
/************* Ajax Contact Form 1.0 *****************************/
-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Ajax Enabled PHP Contact Form</title>
<style type="text/css">
td
{	
	border:1px solid gray;
	font-size:12px;
}
.header
{
	background-color:#CCCCCC;
	font-size:20px;
}
.error
{
	background-color:#FFBFBF;
	color:#FF0000;
	font-size:14px;
}
*
{
	font-family:Verdana, Arial, Helvetica, sans-serif;
}
textarea,.textbox
{
	width:100%;
	border:1px solid gray;
}
</style>
</head>
<script type="text/javascript" src="formProcess.js"></script>
<body>
<form name="contact" id="contact" method="post" action="contact.html" style="display:inline;">
  <table width="70%"  border="0" align="center" cellpadding="5" cellspacing="0">
    <tr>
      <td colspan="2" class="header"><div align="center">Contact Form: </div></td>
    </tr>
    <tr id="errorSpanTR" style="display:none;">
      <td colspan="2" class="error"><span id="errorSpan"></span></td>
    </tr>
    <tr>
      <td width="50%">Please enter your name: </td>
      <td width="50%"><input name="customerName" type="text" id="customerName" class="textbox"></td>
    </tr>
    <tr>
      <td width="50%">Please enter your email: </td>
      <td width="50%"><input name="customerEmail" type="text" id="customerEmail" class="textbox"></td>
    </tr>
    <tr>
      <td width="50%">Please enter your telephone: </td>
      <td width="50%"><input name="customerPhone" type="text" id="customerPhone" class="textbox"></td>
    </tr>
    <tr>
      <td width="50%">What should we use to call you back: </td>
      <td width="50%"><input name="callBackMethod" type="radio" value="Phone">
        Phone 
          <input name="callBackMethod" type="radio" value="Email" checked> 
          E-Mail
</td>
    </tr>
    <tr>
      <td width="50%">What time should we call you back (if by phone):</td>
      <td width="50%"><select name="callBackHour" id="callBackHour">
        <option value="1">1</option>
        <option value="2">2</option>
        <option value="3" selected>3</option>
        <option value="4">4</option>
        <option value="5">5</option>
        <option value="6">6</option>
        <option value="7">7</option>
        <option value="8">8</option>
        <option value="9">9</option>
        <option value="10">10</option>
        <option value="11">11</option>
        <option value="12">12</option>
      </select>
        : 
        <select name="callBackMinutes" id="callBackMinutes">
          <option value="00">00</option>
          <option value="05">05</option>
          <option value="10">10</option>
          <option value="15" selected>15</option>
          <option value="20">20</option>
          <option value="25">25</option>
          <option value="30">30</option>
          <option value="35">35</option>
          <option value="40">40</option>
          <option value="45">45</option>
          <option value="50">50</option>
          <option value="55">55</option>
                        </select> <select name="callBackHoursSpan" id="callBackHoursSpan">
                          <option value="AM">AM</option>
                          <option value="PM" selected>PM</option>
                                                                        </select> </td>
    </tr>
    <tr>
      <td>What department should call you back: </td>
      <td width="50%"><select name="departmentInterested" id="departmentInterested">
        <option value="Support" selected>Support</option>
        <option value="Billing">Billing</option>
        <option value="Complaints">Complaints</option>
      </select></td>
    </tr>
    <tr>
      <td>What services are you interested in: </td>
      <td width="50%"><input name="serverInterested[]" type="checkbox" id="serverInterested[]" value="WebDesign">
      Web Design 
        <input name="serverInterested[]" type="checkbox" id="serverInterested[]" value="WebHosting">
Web Hosting 
<input name="serverInterested[]" type="checkbox" id="serverInterested[]" value="WebProgramming"> 
Web Programming
</td>
    </tr>
    <tr>
      <td colspan="2">Please enter your message: </td>
    </tr>
    <tr>
      <td colspan="2"><div align="center">
        <textarea name="customerMessage" id="customerMessage"></textarea>
      </div></td>
    </tr>
    <tr>
      <td colspan="2"><div align="center">
        <input type="button" name="Button" value="Send This Information" onClick="submitForm();">
      </div></td>
    </tr>
  </table>
</form>
</body>
</html> 
ESTE ES EL PHP
Código PHP:
Ver original
  1. <?php
  2. /************* Ajax Contact Form 1.0 *****************************/
  3. /*
  4. Released by AwesomePHP.com, under the GPL License, a
  5. copy of it should be attached to the zip file, or
  6. you can view it on http://AwesomePHP.com/gpl.txt
  7. */
  8. /************* Ajax Contact Form 1.0 *****************************/
  9.  
  10. /* Emails to send admins (comma separated) */
  11. $toEmails = '[email protected]';
  12.  
  13. /* Site Name */
  14. $siteName = 'Ajax Contact Form Demo';
  15.  
  16. /* Email Subject for admins */
  17. $subject = 'You\'v Got Mail';
  18.  
  19. /* Email subject for users making the contact*/
  20. $subjectUser = 'ESTO ES UN FORMULARIO DE PRUEBA CON AJAX';
  21.  
  22. /* Email message to send users making the contact*/
  23. $userMessage = "Esto es un correo de confirmacion de que usted nos ha escrito";
  24. /* Email message add-on if also sending variables (information) */
  25. $userMessageVariables =
  26. "Here is the information you sent us:\n<br />
  27. -------------------------------------------------\n<br />";
  28.  
  29. /* Thank you message on page */
  30. $thankYouNote = 'Su mensaje ha sido enviado gracias.';
  31.  
  32. /* Send Thank you Email to sender */
  33. $sendThankYou = true;
  34.  
  35. /* Include form variables in Thank you Email */
  36. $sendVariable = true;
  37.  
  38. /* Email field to send thank you to */
  39. $thankYouEmailField = 'customerEmail';
  40.  
  41. /* Do you want to require any fields ?*/
  42. $REQUIRE[] = 'customerName';
  43. $REQUIRE[] = 'customerMessage';
  44.  
  45. /* Email fields to check for validation */
  46. /*
  47. If you want an email field to be required, it should
  48. also be on the REQUIRE list
  49. */
  50. $EMAILFIELD[] = 'customerEmail';
  51.  
  52.  
  53. ?>

Pero hay otros archivos en .js y .txt