HTML - Using Captcha Or Something Similar
Would like to use CAPTCHA or something on my web site instead of simply providing a contact email address.
I'm interested in suggestions or a simple CAPTCHA type solution, recommendation or script. Thank you. Similar TutorialsThis may be a really simple question but thank you all for your time none the less. A family member started making a site using the templates on one.com, he made a bit of a mess so having limited knowledge I took over and tidied it up a little, the problem I have is that I have 6 tabs across the top of the page and 7 hyperlinks down the side. But on certain pages I need another row of tabs along the top and not sure which is the best way to do it. Would it be altering the code of the tab menu already there of embeding a new template in to the sites body?? or maybe another way?? I have no idea how to do any of these things so any help would be thankfully recieved Consider I have two Web pages and i have one image that appears in both the web pages .. Please post the code that will help me to find the image that is repeated in both the web page and a way to block the image .. my idea is to find the contents(the file name given within quotes) of the img tag and then compare with the img tag in the second page to find out the content that is repeated.. kindly help me implement this using a html code Wonder if anybody can help me. I'm looking for the correct code to be able to grab a piece of text from a text file (rather than having the text in the raw code) and insert it into a page, in a similar manner that the img src="x.jpg" command grabs the picture at x.jpg and inserts it into a page. Any ideas? Thanks for any help. Peter+ I am having a problem adding captcha to this form. I am looking at tutorials but are even more confused by them please help.
HTML Code: <head> <link rel=stylesheet href="stylesheet2004.css" type="text/css"> <script language="javascript" src="hide.js" type="text/javascript"></script> <script type="text/javascript"> <!-- function MM_validateForm() { //v4.0 if (document.getElementById){ var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments; for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=document.getElementById(args[i]); if (val) { nm=val.name; if ((val=val.value)!="") { if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@'); if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n'; } else if (test!='R') { num = parseFloat(val); if (isNaN(val)) errors+='- '+nm+' must contain a number.\n'; if (test.indexOf('inRange') != -1) { p=test.indexOf(':'); min=test.substring(8,p); max=test.substring(p+1); if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n'; } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; } } if (errors) alert('The following error(s) occurred:\n'+errors); document.MM_returnValue = (errors == ''); } } <script language="JavaScript"> // Code for validating the form // Visit http://www.javascript-coder.com/html-form/javascript-form-validation.phtml // for details var frmvalidator = new Validator("contact_form"); //remove the following two lines if you like error message box popups frmvalidator.EnableOnPageErrorDisplaySingleBox(); frmvalidator.EnableMsgsTogether(); frmvalidator.addValidation("name","req","Please provide your name"); frmvalidator.addValidation("email","req","Please provide your email"); frmvalidator.addValidation("email","email","Please enter a valid email address"); </script> <script language='JavaScript' type='text/javascript'> function refreshCaptcha() { var img = document.images['captchaimg']; img.src = img.src.substring(0,img.src.lastIndexOf("?"))+"?rand="+Math.random()*1000; } </script> //--> </script> <script language="javascript" src="emailvalidation.js" type="text/javascript"></script> </head> <body> width="386" height="65" border="0"></div></nobr> <table border="0" width="770" cellspacing="0" cellpadding="0" align="center"> </tr> </table> <table border="0" width="770" cellspacing="0" cellpadding="0" align="center"> <tr> <td id="navigation" valign="top" width="155"> <!-- navigation--> <script language="javascript" src="navigation.js" type="text/javascript"></script> <noscript> <div class="nav"><a href="/instruments/index.html">Products</a></div> <div class="nav"><a href="/applications/index.html">Applications Gallery</a></div> <div class="nav"><a href="/downloads.html">Product Literature</a></div> <div class="nav"><a href="/order.html">How to Order</a></div> <div class="nav"><a href="/about.html">About Mark-10</a></div> <div class="nav"><a href="/contact.html">Contact Us</a></div> <div class="nav"><a href="/faq.html">Frequent Questions</a></div> <div class="nav"><a href="/distributor.html">Distributors</a></div> <div class="nav"><a href="/tools/angle.html">Conversion Calculators</a></div> <div class="nav"><a href="/list.html">Join Mailing List</a></div> <div class="nav"><a href="/index.html">Home</a></div></noscript> <!-- end navigation--> </td> <td id="spacer" class="divid"><img src="images/spacer.gif" alt="" width="11" height="1" border="0"></td> <td id="content_table"> <h1>INQUIRIES</h1> <p>Thank you for taking an interest in Mark-10 force and torque measurement products. If you have any specific questions or an application for which you would like us to recommend a solution, please complete the appropriate fields below. If you wish to receive our latest catalog and/or be added to our mailing list, please check the appropriate boxes below.</p> <p> </p> <FORM id="frmCaptcha" NAME="frmCaptcha" METHOD="POST" action="http://www.mark-10.com/cgi-bin/mailto" style="padding:0px; margin:0px;"> <INPUT TYPE="hidden" NAME="RECIPIENT" VALUE="info@mark-10.com"> <INPUT TYPE="hidden" NAME="subject" VALUE="Mark-10 Web Submit Form"> <INPUT TYPE="hidden" NAME="THANKURL" VALUE="http://www.mark-10.com/thankyou-inquiry.html"> <input type="hidden" name="identicalfields" value="Email,Emailconfirm"> <table border="0" cellpadding="2" style="border-collapse: collapse" bordercolor="#111111" width="600" height="493"> <tr> <tr> <td width="131" height="22" colspan="2" align="right">*Name:</td> <td height="22" colspan="2" onfocus=><input type="text" name="Name" id="Name"></td> </tr> <tr> <td width="131" height="22" colspan="2" align="right"><font size="2">Title:</font></td> <td colspan="2" height="22"><input name="Title" type="text" size="41"></td> </tr> <tr> <p style="width:300px; text-align:right;"> <td colspan="2" style="text-align: right"> *Email:</td> <td height="22" colspan="2" align="left"><input type="text" name="Email" id="Email"></td> </tr> <tr> <td width="131" height="22" colspan="2" align="right">*Confirm Email: </td> <td height="22" colspan="2" align="left"><input type="text" name="Emailconfirm" size="22" id="Emailconfirm"></td> </tr> <tr> <td width="131" height="22" colspan="2" align="right"><font size="2">Company: </font></td> <td colspan="2" height="22"><input name="Company" type="text" size="41"></td> </tr> <tr> <td width="131" height="22" colspan="2" align="right"><p align="left" style="text-align: right; margin-top: 0; margin-bottom: 0"> Industry:</td> <td colspan="2" height="22"><input name="Industry" type="text" size="41"></td> </tr> <tr> <td width="131" height="22" colspan="2" align="right"><font size="2">*Address:</font></td> <td colspan="2" height="22"><input name="Address1" type="text" id="Address1" size="53"></td> </tr> <tr> <td width="131" height="22" colspan="2" align="right">*<font size="2">City:</font></td> <td colspan="2" height="22"><input name="City" type="text" id="City" size="30"></td> </tr> <tr> <td width="131" height="22" colspan="2" align="right"><font size="2">*State/Province:</font></td> <td colspan="2" height="22"><input name="State" type="text" id="State" size="30"></td> </tr> <tr> <td width="131" height="22" colspan="2" align="right"><font size="2">*Zip / Postal Code:</font></td> <td colspan="2" height="22"><input name="Zip" type="text" id="Zip" size="30"></td> </tr> <tr> <td width="131" height="22" colspan="2" align="right"><font size="2">Country:</font></td> <td colspan="2" height="22"><input name="Country" type="text" size="30"></td> </tr> <tr> <td width="131" height="22" colspan="2" align="right"><font size="2">Telephone:</font></td> <td width="202" height="22"><input name="Tel" type="text" size="30"></td> <td width="247" height="22"><font size="2">Ext: </font> <input name="Ext" type="text" size="9"></td> </tr> <tr> <td width="131" height="22" colspan="2" align="right"><font size="2">Fax:</font></td> <td colspan="2" height="22"><input name="Fax" type="text" size="30"></td> </tr> <tr> <td width="131" height="75" colspan="2" align="right"><p style="text-align: right; margin-top: 0; margin-bottom: 0"><font size="2"> Application </font></p> <p style="text-align: right; margin-top: 0; margin-bottom: 0"><font size="2"> or Question:</font> <p> </td> <td colspan="2" height="75"><textarea name="Application" style="width:425px; height: 75px;" rows="1" cols="20"></textarea></td> </tr> <tr> <td width="131" height="6" colspan="2" align="right"></td> <td colspan="2" height="6"><input type="checkbox" name="SendCatalog" value="Yes"> <font size="2"> Send me your latest catalog</font></td> </tr> <tr> <td height="34" colspan="2" align="right"> </td> <td colspan="2" height="34"><input type="checkbox" name="AddToMailingList" value="Yes"> <font size="2"> Add me to your mailing list</font></td> </tr> <tr> <td height="34" colspan="2" align="right"> </td> <td colspan="2" height="34"> <img id="imgCaptcha" src="create_image.php" /> <label for="message"><br> Enter the code above here :</label> <input id="txtCaptcha" type="text" name="txtCaptcha" value="" maxlength="10" size="32" /></td> </tr> <tr> <td height="34" colspan="2" align="right"> </td> <td colspan="2" height="34"><input id="btnCaptcha" type="button" value="Captcha Test" name="btnCaptcha" onClick="MM_validateForm('Name','','R','Email','','RisEmail','Emailconfirm','','RisEmail','Address1','','R','City','','R','State','','R','Zip','','R');return document.MM_returnValue; return ErrorCheck(); getParam(document.frmCaptcha)" value="Submit"> <input type="reset" value="Clear" name="Reset"></td> </tr> </table> </form></td> </tr> </table> <br> <table cellspacing="2" width=525 border=0 celpadding="3"> </table> </FORM> </body> Hi I want to add a CAPTCHA to my contact form as i have been getting hit badly by spammers was wondering if any one could give me some advice or script on how to do that....thanks in advance The contactus page currently sends data to 3 email addresses. I dont verify these fields currently but wish to do so. I merely have them sent to feedback.php which accepts the data and sends the emails. I want two things done where I need help: 1, I need all fields to be validated in the contactus page itself before going to the feedback.php file 2, I want a simple captcha that can also be verified on contactus.php itself. Can someone help? Thanks Navs We currently have a feedback form (feedback.php) that is used in our contactus page. This gets sent to three email address. I now want to add a captcha to it and create a verification for all the fields in the contactus page itself ah sorry i think this should be in php thread Hi, im trying to have a math captcha in my registration form, but having trouble with setting it up in my form. sorry for the large code. If i change the value of $_POST['Submit'] to something else like $_POST['Submit1'] and then same for the math image captcha then it works, but i would like it to work as part of the form, makes sense? lol right now the form just posts the value and doesnt check for captcha values! if someone could help me out here that would be great! thank you. <?php if(isset($_POST['Submit'])){ if($_POST['Submit'] != $_SESSION['security_number']) { $error = ""; } else { $error = ""; } //NEED TO CHECK IF FIELDS ARE FILLED IN if( empty($_POST['name']) && (empty($_POST['email']))){ header("Location:Messages.php?msg=3"); exit(); } if( empty($_POST['pw1']) && (empty($_POST['pw2']))){ header( "Location:Messages.php?msg=4" ); exit(); } $name=$_POST['name']; $email=$_POST['email']; $pw1=$_POST['pw1']; $pw2=$_POST['pw2']; if("$pw1" !== "$pw2" ){ header( "Location:Messages.php?msg=5" ); exit(); } $ip = $_SERVER['REMOTE_ADDR']; //connect to the db server , check if uname exist include('config.php'); $query1=("Select * from user where email='$email'"); $result1= mysql_query($query1); $num1=mysql_num_rows($result1); if ($num1 > 0) {//Email already been used header( "Location:Messages.php?msg=11" ); exit(); }else{ $query=("Select * from user where uname='$name'"); $result= mysql_query($query); $num=mysql_num_rows($result); if ($num > 0) {//Username already exist header( "Location:Messages.php?msg=6" ); exit(); }else{ //if username does not exist insert user details $query=( "INSERT INTO user (uname, pw,email,date_joined,ip,level) VALUES ('$name',md5('$pw1'),'$email',NOW(),'$ip','Normal')"); if (@mysql_query ($query)) { header("location:login.php?reg=1"); exit; } } } mysql_close(); } ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html><!-- InstanceBegin template="/Templates/Auth.dwt.php" codeOutsideHTMLIsLocked="false" --> <head> <!-- InstanceBeginEditable name="doctitle" --> <title>Registration</title> <!-- InstanceEndEditable --> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <!-- InstanceBeginEditable name="head" --> <!-- InstanceEndEditable --> <link href="styleLog.css" rel="stylesheet" type="text/css"> <script language="javascript" type="text/javascript"> function reloadCaptcha() { document.getElementById('captcha').src = document.getElementById('captcha').src+ '?' +new Date(); } </script> </head> <body> <table width="100%" border="0" cellspacing="7" cellpadding="0"> <tr class="temptitle"> <td><!-- InstanceBeginEditable name="EditRegion4" -->New User Registration <!-- InstanceEndEditable --></td> </tr> <tr> <td><!-- InstanceBeginEditable name="EditRegion3" --> <form name="form1" action="register.php" method="post"> <table width="657" border="0"> <tr> <td width="122"><div align="left">Name</div></td> <td width="525"><input name="name" type="text" size="40"></td> </tr> <tr> <td><div align="left">Email</div></td> <td><input name="email" type="text" size="40"></td> </tr> <tr> <td><div align="left">Password</div></td> <td><input name="pw1" type="password" size="40"></td> </tr> <tr> <td ><div align="left">Confirm Password </div></td> <td><input name="pw2" type="password" size="40"></td> </tr> <tr> <td><img src="math_captcha/image.php" alt="Click to reload image" title="Click to reload image" id="captcha" onclick="javascript:reloadCaptcha()" /></td> <td><input type="text" name="Submit" value="what's the result?" onclick="this.value=''" /></td> <td> </tr> <tr> <td></td> <td> <input name="Submit" type="submit" value="Register"></td> </tr> </table> </form> <?=$error?> |