/    Sign up×
Community /Pin to ProfileBookmark

Im am doing this as a test so it is very primitive. I want to be able to type in some text in a form and have it appear on a picture. The form works fine but the text doesn’t show up on the picture (it doesn’t show up at all)

Here is the form script

<form action=”PicRe.php” method=”POST”>
Enter Text: <input type=”text” name=text/>
<input type=”submit” value=”Go!”/>
</form>

Here is the picture/text script

<?php
$text=$_POST[“text”];
$picture = imagecreate(“300”, “200”);
$ImageColor = imagecolorallocate($picture, 0x00, 0x00, 0x00);
$TextColor = imagecolorallocate($picture, 0xFF, 0xFF, 0xFF);
ImageTTFText($picture, 12, 0, 10, 100, $TextColor, “Verdana”, $text);
header(“content-type: image/JPEG”);
ImageJPEG($picture);
?>

If you want an example of what is wrong, go [URL=http://strikershot21.hollosite.com/Pic.php]here[/URL]

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@jebster1caNov 14.2004 — This
[CODE]Enter Text: <input type="text" name=text/>[/CODE]
Should be
[CODE]Enter Text: <input type="text" name="text" />[/CODE]
×

Success!

Help @StrikerShot21 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...