Forum Moderators: coopster

Message Too Old, No Replies

Need help with captacha on php form

Capatcha Image not visible on my form

         

RenderIT

5:30 am on Mar 31, 2007 (gmt 0)

10+ Year Member



Hi everyone, I am hoping one of you gurus will help with my first attempt at php?

I have a form with a questionaire on my website that is being spammed. I decided to use an image-code addon in an attempt to stop the spam.

I uses phpforms and bought their image code addon. They installed it on my server and gave me instructions how to add it to the page.

I have done as requested but the image is not showing.. just a placeholder.

the code they gave me to add to my page is

<?php
require_once( '/home/rend1/public_html/phpforms/img-code/img_code.php');
list($sCode, $sPath) = GenerateImgCode();
?>
<img src="<?=$sPath?>">
<input type="hidden" name="imgcode_id" value="<?=$sCode?>">
<input type="text" name="imgcode_code" value="" style="width:100%;">

the page is at <snip>

Is there anyone who would like to help me to get this working.. would be happy to correspond privately if required.

Thanks in advance
Lindy

[edited by: eelixduppy at 10:48 am (utc) on April 2, 2007]
[edit reason] no URLs, please [/edit]

phranque

5:58 am on Mar 31, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



i would check the server log file for error messages and the first thing i would suspect is that you need to have some truetype fonts installed or properly referred to in your configuration.

cameraman

9:45 am on Mar 31, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You might also try changing these two lines:
<img src="<?=$sPath?>">
<input type="hidden" name="imgcode_id" value="<?=$sCode?>">

to:
<img src="<?php echo $sPath;?>">
<input type="hidden" name="imgcode_id" value="<?php echo $sCode;?>">

RenderIT

9:28 am on Apr 2, 2007 (gmt 0)

10+ Year Member



Unfortunately no luck - does anyone else have an idea of how to help me?

Thanks
Lindy

whoisgregg

12:51 pm on Apr 2, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Add this line to the top of your script and report any errors:

error_reporting(E_ALL);

Also, what is being echoed into the

src
attribute of the
img
tag? Is it a valid filepath? Are images being generated in that location? If not, are the permissions of that directory such that the web user can write files there?