contact.php error

I am getting some output errors after simply amending a text link on this page;

http://www.locus-capital.com/contact.php

The output can be seen on the page above. The full code for the contact.php page is here;

[php][code]

hexdec(substr($hexcolor,0,2)),'g'=>hexdec(substr($hexcolor,2,2)),'b'=>hexdec(substr($hexcolor,4,2))); return $dec_color; } function generateCode($characters) { /* list all possible characters, similar looking characters and vowels have been removed */ $possible = '23456789bcdfghjkmnpqrstvwxyz'; $code = ''; $i = 0; while ($i < $characters) { $code .= substr($possible, mt_rand(0, strlen($possible)-1), 1); $i++; } return $code; } function CaptchaImage($width='400',$height='30',$characters='5',$hex_bg_color='FFFFFF',$hex_text_color="FF0000",$hex_noise_color="CC0000", $img_file='captcha.jpg') { $rgb_bg_color=$this->hex_to_dec($hex_bg_color); $rgb_text_color=$this->hex_to_dec($hex_text_color); $rgb_noise_color=$this->hex_to_dec($hex_noise_color); $code = $this->generateCode($characters); /* font size will be 60% of the image height */ $font_size = $height * 0.60; $image = @imagecreate($width, $height) or die('Cannot Initialize new GD image stream'); /* set the colours */ $background_color = imagecolorallocate($image, $rgb_bg_color['r'], $rgb_bg_color['g'],$rgb_bg_color['b']); $text_color = imagecolorallocate($image, $rgb_text_color['r'], $rgb_text_color['g'],$rgb_text_color['b']); $noise_color = imagecolorallocate($image, $rgb_noise_color['r'], $rgb_noise_color['g'],$rgb_noise_color['b']); /* generate random dots in background */ for( $i=0; $i<($width*$height)/3; $i++ ) { imagefilledellipse($image, mt_rand(0,$width), mt_rand(0,$height), 1, 1, $noise_color); } /* generate random lines in background */ for( $i=0; $i<($width*$height)/150; $i++ ) { imageline($image, mt_rand(0,$width), mt_rand(0,$height), mt_rand(0,$width), mt_rand(0,$height), $noise_color); } /* create textbox and add text */ $textbox = imagettfbbox($font_size, 0, $this->font, $code); $x = ($width - $textbox[4])/2; $y = ($height - $textbox[5])/2; imagettftext($image, $font_size, 0, $x, $y, $text_color, $this->font , $code); /* save the image */ imagejpeg($image,$img_file); imagedestroy($image); echo "\"security"; $_SESSION['captcha_code'] = $code; }

}
?>

<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type" /> 
<title>Locus Capital Consulting - hedge funds,  investment consulting,  investment adviser,  hedge fund research,  family office management,  wealth management</title> 
<meta content="hedge funds,  investment consulting,  investment adviser,  hedge fund research,  family office management,  wealth management,  alternative investing art management,  contemporary art,  fine art,  contemporary painting,  sculpture,  porcelain,  paintings," name="keywords" /> 
<meta content="Locus Capital Consulting is a group of consultants based in London whose specialist knowledge is applied to the wealth management arena across a wide variety of asset classes and styles of investment." name="description" /> 
<meta content="FOLLOW,INDEX" name="robots" /> <script src="/js/email.js" language="javascript"></script> <script src="/js/jquery.js" type="text/javascript"></script> <script src="/js/jquery-ui.min.js" type="text/javascript"></script> <script src="/js/jqueryslidemenu.js" type="text/javascript"></script> <script src="/js/jquery.form.js" type="text/javascript"> </script> <!--[if IE 6]>

<![endif]–>








Locus Capital Consulting











Contact Us


Please fill in the following details and we’ll be in touch shortly…





Your Name:


Your Email:


Phone:*


Website:


Message:

























Enter Code:










Useful Links




Address Details



  • Locus Capital Consulting

  • 43-45 Portman Square

  • London, W1H 6HN



General Contact Info



  • Phone: +44 (0) 20 7060 1962





Contact Info for external fund managers













[/code][/php]

Just cannot figure out what happened and after asking my hosting company and getting ignored i really need some help please.

I can’t see anything at all on the page you listed but on line 6:

[php]hexdec(substr($hexcolor,0,2)),‘g’=>hexdec(substr($hexcolor,2,2)),‘b’=>hexdec(substr($hexcolor,4,2)));[/php]

You’ve not opened your PHP bracket:

[php]

<? hexdec(substr($hexcolor,0,2)),'g'=>hexdec(substr($hexcolor,2,2)),'b'=>hexdec(substr($hexcolor,4,2))); [/php]

Please dont use short tags. Use <php

Whoops, typo. I don’t even have that enabled on my server! ???

excellent thanks however i am getting more errors see: http://www.locus-capital.com/contact.php

something to do with these lines perhaps;


                          </tr> 
                        </tbody>
                      </table> 
                    </td> 
                  </tr> 
                  <tr> 
                    <td><br /></td> 
                    <td><span class="form-col1">Enter Code:</span> <input type="text" name="code" /> <!--?php echo $captcha_msg ?-->

[php]

 </head>
 <body>
 <?php
 hexdec(substr($hexcolor,0,2)),'g'=&gt;hexdec(substr($hexcolor,2,2)),'b'=&gt;hexdec(substr($hexcolor,4,2)));
return $dec_color;
}
function generateCode($characters) {
	/* list all possible characters, similar looking characters and vowels have been removed */
	$possible = '23456789bcdfghjkmnpqrstvwxyz'; 
	$code = '';
	$i = 0;
	while ($i &lt; $characters) { 
		$code .= substr($possible, mt_rand(0, strlen($possible)-1), 1);
		$i++;
	}
	return $code;
}
function CaptchaImage($width='400',$height='30',$characters='5',$hex_bg_color='FFFFFF',$hex_text_color=&quot;FF0000&quot;,$hex_noise_color=&quot;CC0000&quot;, $img_file='captcha.jpg') {
	$rgb_bg_color=$this-&gt;hex_to_dec($hex_bg_color);
	$rgb_text_color=$this-&gt;hex_to_dec($hex_text_color);
	$rgb_noise_color=$this-&gt;hex_to_dec($hex_noise_color);
	$code = $this-&gt;generateCode($characters);
	/* font size will be 60% of the image height */
	$font_size = $height * 0.60;
	$image = @imagecreate($width, $height) or die('Cannot Initialize new GD image stream');
	/* set the colours */
	$background_color = imagecolorallocate($image, $rgb_bg_color['r'], $rgb_bg_color['g'],$rgb_bg_color['b']);
	$text_color = imagecolorallocate($image, $rgb_text_color['r'], $rgb_text_color['g'],$rgb_text_color['b']);
	$noise_color = imagecolorallocate($image, $rgb_noise_color['r'], $rgb_noise_color['g'],$rgb_noise_color['b']);
	/* generate random dots in background */
	for( $i=0; $i&lt;($width*$height)/3; $i++ ) {
		imagefilledellipse($image, mt_rand(0,$width), mt_rand(0,$height), 1, 1, $noise_color);
	}
	/* generate random lines in background */
	for( $i=0; $i&lt;($width*$height)/150; $i++ ) {
		imageline($image, mt_rand(0,$width), mt_rand(0,$height), mt_rand(0,$width), mt_rand(0,$height), $noise_color);
	}
	/* create textbox and add text */
	$textbox = imagettfbbox($font_size, 0, $this-&gt;font, $code);
	$x = ($width - $textbox[4])/2;
	$y = ($height - $textbox[5])/2;
	imagettftext($image, $font_size, 0, $x, $y, $text_color, $this-&gt;font , $code);
	/* save the image */
	imagejpeg($image,$img_file);
	imagedestroy($image);
	echo "<img id="\&quot;captchaImg\&quot;" alt="\&quot;security" src="\&quot;$img_file?&quot;.time().&quot;\&quot;" />";
	$_SESSION['captcha_code'] = $code;
}

}
?>

  <meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type" /> 
  <title>Locus Capital Consulting - hedge funds,  investment consulting,  investment adviser,  hedge fund research,  family office management,  wealth management</title> 
  <meta content="hedge funds,  investment consulting,  investment adviser,  hedge fund research,  family office management,  wealth management,  alternative investing art management,  contemporary art,  fine art,  contemporary painting,  sculpture,  porcelain,  paintings," name="keywords" /> 
  <meta content="Locus Capital Consulting is a group of consultants based in London whose specialist knowledge is applied to the wealth management arena across a wide variety of asset classes and styles of investment." name="description" /> 
  <meta content="FOLLOW,INDEX" name="robots" /> <script src="/js/email.js" language="javascript"></script> <script src="/js/jquery.js" type="text/javascript"></script> <script src="/js/jquery-ui.min.js" type="text/javascript"></script> <script src="/js/jqueryslidemenu.js" type="text/javascript"></script> <script src="/js/jquery.form.js" type="text/javascript"> </script> <!--[if IE 6]>

<![endif]–>








Locus Capital Consulting











Contact Us


Please fill in the following details and we’ll be in touch shortly…





Your Name:


Your Email:


Phone:*


Website:


Message:

























Enter Code:










Useful Links




Address Details



  • Locus Capital Consulting

  • 43-45 Portman Square

  • London, W1H 6HN



General Contact Info



  • Phone: +44 (0) 20 7060 1962





Contact Info for external fund managers













[/php]

The error is how you’ve uploaded… It’s reading some of your " as ASCII.

Take a look at your FTP settings.

I didn’t upload it. I edited one line of text i think it reformatted in the WYSIWYG environment. Just trying to figure out what characters need altering.

Sponsor our Newsletter | Privacy Policy | Terms of Service