html - space does not work in input tag with php -


i'm using following code in php file.

<?php      $text = $_get['name'];     $image_url="dump/".rawurlencode(trim($text)).".jpg";     $text= $_get['name'];            $jpg_image = imagecreatefromjpeg('image.jpg');         $blue = imagecolorallocate($jpg_image, 59, 89, 152);          $font_path = 'opensans-italic.ttf';         imagettftext($jpg_image, 22, 0, 278,37, $blue, $font_path, $text);           imagejpeg($jpg_image,$image_url);         imagedestroy($jpg_image);       ?> 

in code i'm getting text input tag html file$_get['name']; , i'm getting image dump because want only.this ode working when put "space" in input tag not show me image eg:- name surname space between name , surname when i'm giving space between word does't show me result working fine without space hope find solution.

leave things see have done have tested it working well.

<?php  $text = $_get['name']; $image_url="dump/".urlencode(trim($text)).".jpg"; $text= $_get['name'];        $jpg_image = imagecreatefromjpeg('image.jpg');     $blue = imagecolorallocate($jpg_image, 59, 89, 152);      $font_path = 'opensans-italic.ttf';     imagettftext($jpg_image, 22, 0, 278,37, $blue, $font_path, $text);       imagejpeg($jpg_image,$image_url);     imagedestroy($jpg_image);   ?> 

just removed raw $image_url="dump/".rawurlencode(trim($text)).".jpg"; , made $image_url="dump/".urlencode(trim($text)).".jpg";


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -