Reputation: 507
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
Reputation: 35963
try this:
$image_path = base_url()."imgs/sign_up_0.png";
echo '<input type="image" src="'.$image_path.'">';
Upvotes: 2