John
John

Reputation: 507

how do you echo input tag of type image and get to load image in codeigniter?

i am trying to echo out an submit button input tag of the type image, but i cant get it to load the image, it is stored in a directory called imgs in the public_html directory of my site. The code that i have is as such:

echo '<input type="image" src="'.base_url("img/sign_up_0.png").'">';

i have the url helper auto-loaded and use it else were to load images in links the same way.

Upvotes: 0

Views: 1314

Answers (1)

Alessandro Minoccheri
Alessandro Minoccheri

Reputation: 35963

try this:

 $image_path = base_url()."imgs/sign_up_0.png";
 echo '<input type="image" src="'.$image_path.'">';

Upvotes: 2

Related Questions