SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Guru
    Join Date
    Nov 2004
    Location
    calif
    Posts
    723
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Where in this Form does it direct the sent data?

    Where in this Form code does it direct the Form where to send the Submitted info? Thanks

    Code:
    <html>
    <head>
      <title></title>
    
    
    </head>
    <body>
    <br>
    <h1 style="border-bottom:1px solid #dddcdc;"><br><center> Form</center></h1>
    
            <p><center><font face="verdana"><font size="2"><font color=#000000;"></font></font></p>
    
            <p><font face="verdana"><font size="2"><font color=#800000;">Please complete the simple form below.</font></font></p>
    
            <p><font face="verdana"><font size="2"><font color=#000000;">.</font></font></p>
    
            <p><font face="verdana"><font size="2"><font color=#000000;"> </font></font></center></p>
    
    <!--<div style="height: 80px; background-color: #336699;">
      <span class="page_title"><span class="form_title">Form</span></span>
    </div>-->
    
    <br />
    
    <table cellpadding="0" cellspacing="0" align="center" width="600">
    <tr>
      <td>
        <font face="verdana"><font size="2"><font color=#800000;">[var.result]</font></font><font color="red"><strong>[var.error]</strong></font><br>
        <hr size="1" />
        <br />
    
        <form action="/page.php?page=14" method="post" name="contact_us" onSubmit="return capCheck(this);">
    
    
        <table cellpadding="0" width="100%">
        <tr>
    		  <td width="10" class="required_field">*</td>
          <td width="80">First Name:</td>
          <td><input type="text" name="name" maxlength="50" style="width:300px" /></td>
        </tr>
        <tr>
    		  <td class="required_field">*</td>
          <td>Last Name:</td>
          <td><input type="text" name="email" maxlength="40" style="width:300px" /></td>
        </tr>
        <tr>
    		  <td class="required_field">*</td>
          <td>Type:</td>
          <td><input type="text" name="custom1" maxlength="20" style="width:300px" /></td>
        </tr>
        <tr>
    		  <td class="required_field">*</td>
          <td>Number:</td>
          <td><input type="text" name="custom2" maxlength="20" style="width:300px" /></td>
        </tr>
        <tr>	  
    <tr>
          <td class="required_field">*</td>
          <td>Enter Image Code:</td>
          <td><input type="text" value="" name="captext" style="width: 100px" maxlength="6" /></td>
        </tr>
    <tr>
          <td></td>
          <td><a onclick="refresh_security_image(); return false;" style="cursor:pointer;"><u>Refresh Image</u></a></td>
          <td><img src="includes/captcha.php" border="0" id="verificiation_image" /></a></td>
        </tr>
        </table>
    <br>
    
    <br>
        <p>
          <input type="hidden" name="submited" value="1" />
          <input type="submit" name="submit" value="Submit" />
        </p>
    
        </form>
    
      </td>
    </tr>
    </table>
    <script type="text/javascript">
      <!--
      function refresh_security_image() {
    
      	var new_url = new String("[var.base_url]/includes/captcha.php?width=132&amp;height=36&charcators=");
    	new_url = new_url.substr(0, new_url.indexOf("width=") + 37);
    	// we need a random new url so this refreshes
    	var chr_str = "123456789";
    	for(var i=0; i < 6; i++)
    	new_url = new_url + chr_str.substr(Math.floor(Math.random() * 2), 1);
    	document.getElementById("verificiation_image").src = new_url;
      }
      -->
     </script>
    
     <!-- captcha start -->
     <script type="text/javascript" id="clientEventHandlersJS" language="javascript">
     <!--
     	function capCheck(theForm) {
    		var xmlhttp;
    		var sReply;
    		DataToSend = "action=process&captext=" + escape(theForm.captext.value);
    		if (window.XMLHttpRequest) {
    			xmlhttp=new XMLHttpRequest();
    			xmlhttp.open("POST",'includes/process.php',false);
    			xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
    			xmlhttp.send(DataToSend);
    			sReply = xmlhttp.responseText;
    		} else if (window.ActiveXObject) {
    			xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
    			xmlhttp.open("POST",'includes/process.php',false);
    			xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
    			xmlhttp.send(DataToSend);
    			sReply = xmlhttp.responseText;
    		}
    		if (sReply == "good") {
    			return true;
    		} else if (sReply == "bad") {
    			alert("Security code not valid, please try again"); return false;
    		} else if (sReply == "") {
    			alert("You must enter the security code"); return false;
    		} else {
    			alert("Error"); return false;
    		}
    	}
      -->
      </script>
      <!-- captch end -->
    
    </body>
    </html>

  2. #2
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,608
    Mentioned
    24 Post(s)
    Tagged
    1 Thread(s)
    To page.php
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  3. #3
    SitePoint Wizard
    Join Date
    Nov 2005
    Posts
    1,191
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    <form action="/page.php?page=14" method="post" name="contact_us" onSubmit="return capCheck(this);">

    with that line, in particular

    action="/page.php?page=14"

    which directs to page.php with the GET data page=14

  4. #4
    SitePoint Guru
    Join Date
    Nov 2004
    Location
    calif
    Posts
    723
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for your replies.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •