add text and number image


Posted on 16th Feb 2014 07:03 pm by admin

hi guys ..

ok see i want the user to add their name and pick a number then click get it and it prints the name on top and the number bellow it on a t-shirt i just cant seem to get this rite i have no clue how to go about doing this please can you help me this is what i have so far Code: <?php
$ShowBookmark = "False";
Did you know?Explore Trending and Topic pages for more stories like this.
include 'Include/Header.php';

if (Get_QString('Post') == "True") {
Get_image();
} else {
Show_Form();
}

function Show_Form() {
echo '<div class="hd2"><center><font color=#666666><strong>Soccer Kit Gen</strong></font></center></div>
'."n";
echo ' Name: <input type="text" name="name" /><br />'."n";
echo ' <form method="post" action="test.php?Post=True">'."n";
echo ' Number: <select name="number">'."n";
echo ' <option value="0" selected="selected">0</option>'."n";
echo ' <option value="1">1</option>'."n";
echo ' <option value="2">2</option>'."n";
echo ' <option value="3">3</option>'."n";
echo ' <option value="4">4</option>'."n";
echo ' <option value="5">5</option>'."n";
echo ' <option value="6">6</option>'."n";
echo ' <option value="7">7</option>'."n";
echo ' <option value="8">8</option>'."n";
echo ' <option value="9">9</option>'."n";
echo ' <option value="10">10</option>'."n";
echo ' <option value="11">11</option>'."n";
echo ' <option value="12">12</option>'."n";
echo ' <option value="13">13</option>'."n";
echo ' <option value="14">14</option>'."n";
echo ' <option value="15">15</option>'."n";
echo ' <option value="16">16</option>'."n";
echo ' <option value="17">17</option>'."n";
echo ' <option value="18">18</option>'."n";
echo ' <option value="19">19</option>'."n";
echo ' <option value="20">20</option>'."n";
echo ' <option value="21">21</option>'."n";
echo ' <option value="22">22</option>'."n";
echo ' <option value="23">23</option>'."n";
echo ' <option value="24">24</option>'."n";
echo ' <option value="25">25</option>'."n";
echo ' <option value="26">26</option>'."n";
echo ' <option value="27">27</option>'."n";
echo ' <option value="28">28</option>'."n";
echo ' <option value="29">29</option>'."n";
echo ' <option value="30">30</option>'."n";
echo ' <option value="31">31</option>'."n";
echo ' <option value="21">32</option>'."n";
echo ' <option value="22">33</option>'."n";
echo ' <option value="23">34</option>'."n";
echo ' <option value="24">35</option>'."n";
echo ' <option value="25">36</option>'."n";
echo ' <option value="26">37</option>'."n";
echo ' <option value="27">38</option>'."n";
echo ' <option value="28">39</option>'."n";
echo ' <option value="29">40</option>'."n";
echo ' <option value="30">41</option>'."n";
echo ' <option value="31">42</option>'."n";
echo ' <option value="30">43</option>'."n";
echo ' <option value="31">44</option>'."n";
echo ' </select>';
echo ' </td></tr>'."n";
echo ' <tr><td colspan="2" align=center>
<input type="submit" value="Get It!" name="Submit"></td></tr>'."n";
echo ' </table>'."n";
echo '</form>'."n";
Show_Buttons("True", "index.php?Cmd=100");
}

function Get_image() {
$number = GetPost('number');
$name = GetPost('name');

header("Content-Type: image/jpeg");

$im = ImageCreateFromGif("soccer-kit.png");

$black = ImageColorAllocate($im, 255, 255, 255);

$start_x = 10;
$start_y = 20;

Imagettftext($im, 12, 0, $start_x, $start_y, $black, 'verdana.ttf', "$name");

//Creates the jpeg image and sends it to the browser
//100 is the jpeg quality percentage
Imagejpeg($im, '', 100);

ImageDestroy($im);



include 'Include/Footer.php'; Log_Hit("soccerkitgen");

?>
No comments posted yet

Your Answer:

Login to answer
266 Like 18 Dislike
Previous forums Next forums
Other forums

How to show more than 1 users with this code...
Hello,
i have a table that shows users only if I, as Administrator, want to be shown. But its sho

PHP webpage & array print issue
I have this code running, and it works perfectly … however, see my bottom bit about what I see

How to limit the calls to an API
Hello, in my simple script I call an api which effectively involves me getting an xml file.

H

why is it over writing
Code: $filepaths[] = $_FILES['new_image'];
foreach ($filepaths as $filepath)
{
$imagename =

When file included, REMOTE_ADDR is server's?
I have an index file that handles my site, basically index.php?page=ip will activate "require('

Using loop to count number of entries
I'm writing a program that must ask user to type in numbers. After each entry, the program has to re

Final year project, please point me in the right direction
hi there for my final year project I'm aiming to build a php script shell to use as an expert system

Data Function is Its Not working IN IE8
This is my first time to use formums. I hope i can get solution for this problem. view plaincopy to

post to self
Trying to get my form to submit to itself. However I am also trying to use an image for my submit bu

eregi to preg
Im converting my regex for php 5.3 and I am stuck on the following

Code: [Select]if((eregi(&q

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash