Page 1 of 1

merge images and texts

Posted: Thu Mar 24, 2011 5:03 pm
by vivian
Friends
need to do a little certificate with images and text.
photo and text and the rest will form via processes via php.

I'm trying without success, can you help me?

doubts as also upload an image and set in an area in the pouch in
There are 3 images and texts of the form:
Images:
- Photo.jpg (sent via form)
- Bordas.jpg
- Logo.jpg

How can I adjust these files? And if two or more users send
photos to generate carterinhas simuntaneamente? Each card-carrying would
have a number independently with foto_numero.jpg since
bordas.jpg and the logo.jpg are equal and constant.

Formulario.php

Code: Select all

<html> 
Register for card-carrying <p> </ p> 
<form action="carteirinha.php" method="post"> 
<p> name 
 <input name="nome"> 
</ P> 
<p> profession 
 <input name="profissao" id="profissao"> 
</ P> 
<p> birth date 
 <input name="dataNascimento"> 
</ P> 
<p> sex: 
 <input name="sexo"> 
</ P> 
<p> city 
 <input name="cidade"> 
</ P> 
<p> email 
 <input name="email" id="email"> 
</ P> 
Send <p> photo: </ p> 
<p> 
 <select name="acao" id="acao"> 
<option value='1'> Print </ option> 
<option value="2"> Screen Display </ option> 
<option value="3"> Email </ option> 
 </ Select> 
</ P> 
<p> 
 <input type="submit"> 
</ P> 


</ Form> 
</ Html> 
[/ Code] 
And it follows the code of carteirinha.php: 

[Code]] 
<p> 
Php 
/ / Default read photo.jpg; 
/ / Reduce photo and fit; 

   $ Name = $ _POST ['name']; 
   $ Profession = $ _POST ['profession']; 
   $ Nome = $ _POST ['nome']; 
   $ City = $ _POST ['city']; 
   $ Sex = $ _POST ['gender']; 
   $ Email = $ _POST ['email']; 
   $ Action = $ _POST ['action']; 



/ / Composition results; 

TextToConvert $ = $ _GET ['text']; 
$ Font = 4; 
Imagefontwidth $ width = ($ font) * strlen ($ textToConvert); 
$ Height = imagefontheight ($ font); 
$ Im = @ imagecreatetruecolor ($ width, $ height); 
$ Background_color = imagecolorallocate ($ im, 255, 255, 255), / / ​​this 
means it's white bg 
$ Text_color = imagecolorallocate ($ im, 0, 0.0), / / ​​and of course black text 
imagestring ($ im, $ font, 0, 0, $ textToConvert, $ text_color); 
imagepng ($ im); 

$ Message = $ imagejpg; 

/ / Check for selected output 
if ($ action == "1") { 
echo "<script> window.print ();</ script>"; 
} Else if ($ type == "2") { 
/ / Displays on the screen; 
echo ' 
$ Message; 
'; 
} Else if ($ type == "3") { 
/ / Send email; 

global $ email, / / ​​function to validate the $ email variable in the script all 

$ Date = date ("d / m / y") / / function to get the 
date of sending the e-mail 
$ Hour = date ("H: i") / / to get the time 
with the date function 

$ Site = 'friends' PHP'; 

/ / Here send email to you 
mail ("seu@email.com", / / ​​email where the php will 
send the form data 
     "$ Subject", 
     "Name: $ name \ n 
     Date: $ date \ n 
     Time: $ hour \ n 
     Site: $ site \ n 
     E-mail: $ email \ n 
     Phone: $ phone \ n \ n 
     Message: $ Message " 
     "From: $ email" 
    ); 

/ / Here are the settings for sending e-mail to the visitor 
$ Site = "seu@email.com" / / e-mail that appears 
in the mailbox of visitor 
$ Title = "Your Title" / / title of the message sent 
Visitor 
$ Msg = "$ name, thank you for contacting us soon 
get in touch "; 

/ / Here send e-mail auto-reply for the visitor 
mail ("$ email" 
    "$ Title", 
    "$ Msg" 
    "From: $ site" 
   ); 
echo "$ <p align=center> name, his message was a special ID 
sent successfully </ p> "; 
echo "<p align=center> Thanks for testing our files. </ p>"; 

} 
?> 
can someone help me because I was searching and still buggy.

thanks

Re: merge images and texts

Posted: Wed Mar 30, 2011 10:31 am
by vivian
also ideas?