PHP Plaatje probleempje.

Status
Niet open voor verdere reacties.

Aha2Y

Nieuwe gebruiker
Lid geworden
9 mei 2011
Berichten
4
Hallo, ik zit met een probleem dit is de code.

PHP:
<?php
$text=("$_POST["Naam"]");
$my_img = imagecreate( 200, 80 );
$background = imagecolorallocate( $my_img, 0, 0, 255 );
$text_colour = imagecolorallocate( $my_img, 255, 255, 0 );
$line_colour = imagecolorallocate( $my_img, 128, 255, 0 );
imagestring( $my_img, 4, 30, 25, "$text",
  $text_colour );
imagesetthickness ( $my_img, 5 );
imageline( $my_img, 30, 45, 165, 45, $line_colour );

header( "Content-type: image/png" );
imagepng( $my_img );
imagecolordeallocate( $line_color );
imagecolordeallocate( $text_color );
imagecolordeallocate( $background );
imagedestroy( $my_img );
?>

Ik zou graag willen weten hoe je die $_POST["Naam"] werkend krijgt.

Bedankt, Aha2Y
 
Heb je het al eens geprobeerd zonder de aanhalingstekens en haakjes? Dus
PHP:
$text=$_POST["Naam"];

Op regel 7 mag je de aanhalingstekens ook weglaten (hoewel het met aanhalingstekens ook goed zou moeten gaan):
PHP:
imagestring( $my_img, 4, 30, 25, $text,
  $text_colour );
 
Status
Niet open voor verdere reacties.
Terug
Bovenaan Onderaan