User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 397,120 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,432 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting

Struggling with Captcha

Join Date: Feb 2007
Posts: 3
Reputation: nina26 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
nina26 nina26 is offline Offline
Newbie Poster

Troubleshooting Struggling with Captcha

  #1  
Feb 15th, 2007
Hello all,

I run simply php scripts on my site that allows people to leave comments, for example here on my ANTM page.

I have been trying to incorporate a captcha which works well speperately but I just cannot get it into the comment.php file.

The captcha works if I just post the following on a html/php page:
<formname="signupform"method="post"action="<?=$_SERVER["PHP_SELF"]?>">
Please sign up for our website:
<br>
<br>
Name: 
 
<formname="signupform"method="post"action="<?=$_SERVER["PHP_SELF"]?>">
 
<? insertSecurityImage("security_refid") ?>
<br>
Enter what you see: 
<inputname="security_try"type="text"id="security_try"size="20"maxlength="10">
(can't see? try reloading page) 
<br>
<br>
<inputtype="submit"name="Submit"value="Signup!">
</form>

However, I want to include it in the comment form in its php file which looks like this:
<formname=\"submitcomment\"method=\"post\"action=\"comment/submitcomment.php\"onSubmit=\" return form_Validator(this)\">
<tablewidth=\"100%\">
<tr>
<thcolspan=\"2\"><h3class=\"formtitle\">Leave your comment:</h3></th>
</tr>
<tr>
 
<thscope=\"row\"><pclass=\"req\">Name:</p></th>
<td><inputclass=\"form\"tabindex=\"1\"id=\"name\"name=\"name\" /></td>
</tr>
<tr>
<thscope=\"row\"><pclass=\"opt\">Email:</p></th>
<td><inputclass=\"form\"tabindex=\"2\"id=\"email\"name=\"email\" /></td>
</tr>
<tr>
 
<thscope=\"row\"><pclass=\"opt\">URL:</p></th>
<td><inputclass=\"form\"tabindex=\"3\"id=\"url\"name=\"url\" /></td>
</tr>
<trvalign=\"top\">
<thscope=\"row\"><pclass=\"req\">Comments:</p><br /></th>
<td><textareaclass=\"formtext\"tabindex=\"4\"id=\"message\"name=\"message\"rows=\"10\"cols=\"50\"></textarea></td>
</tr>
 
<tr>
<td>&nbsp;</td>
<td><inputtype=\"submit\"name=\"post\"class=\"submit\"value=\"Submit Comment\" /><br />
<p>Note: Emails will not be visible or used in any way, and are not required. Please keep comments relevant. Any content deemed inappropriate or offensive may be edited and/or deleted. </p>
 
 
 
</td>
</tr>
 
 
 
</table>
<inputtype=\"hidden\"name=\"tuturl\"value=\"$tuturl\" />
<inputtype=\"hidden\"name=\"tutid2\"value=\"$tutid2\" />
</form>

I thought that just adding a new line and inserting the relevant part would work, but it just won't! I have tried this for days now and would be really grateful if someone knew how to do it? :eek:
AddThis Social Bookmark Button
Reply With Quote  
All times are GMT -4. The time now is 2:44 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC