abch624 Posted July 18, 2008 Share Posted July 18, 2008 Hi Guys, I have HTMl embedded into PHP i.e. php echos a few HTML lines and a bit of this code is bellow: echo '"> <input type="image" src="./images/UI/searchbutton.jpg" name="searchButton" alt="Search" tabindex="2"> </form> </td> </tr>'; If you have a look closely there is the section src="./images/UI/searchbutton.jpg" that is where the picture is on the database that I need to be returned and trust me that is the correct path!!!! Now in the browser what happens I only get src="searchbutton.jpg"!!!!!!!!! That is not right and should not be like that.... My main question is why does it not pass the correct URL?????? Please help guys..... Link to comment https://forums.phpfreaks.com/topic/115420-solved-php-echoing-src/ Share on other sites More sharing options...
samshel Posted July 18, 2008 Share Posted July 18, 2008 you sure you are not passing the filename some where else too? try changing the filename for debugging to something like src="./images/UI/searchbutton_new.jpg" it is possible that the problem is some where else because i dont see any issues here or may be i missed out. Link to comment https://forums.phpfreaks.com/topic/115420-solved-php-echoing-src/#findComment-593341 Share on other sites More sharing options...
hansman Posted July 18, 2008 Share Posted July 18, 2008 echo "<input type=\"image\" src=\"./images/UI/searchbutton.jpg\" name=\"searchButton\" alt=\"Search\" tabindex="2">"; Link to comment https://forums.phpfreaks.com/topic/115420-solved-php-echoing-src/#findComment-593342 Share on other sites More sharing options...
samshel Posted July 18, 2008 Share Posted July 18, 2008 echo "<input type=\"image\" src=\"./images/UI/searchbutton.jpg\" name=\"searchButton\" alt=\"Search\" tabindex=\"2\">"; with "\" for tabindex="2" Link to comment https://forums.phpfreaks.com/topic/115420-solved-php-echoing-src/#findComment-593346 Share on other sites More sharing options...
abch624 Posted July 18, 2008 Author Share Posted July 18, 2008 Hey guys, As u would expect stupid minor error it was being echoed from an if statement lol Thanks guys - Zahid Link to comment https://forums.phpfreaks.com/topic/115420-solved-php-echoing-src/#findComment-593354 Share on other sites More sharing options...
PFMaBiSmAd Posted July 18, 2008 Share Posted July 18, 2008 Posting whole actual code is the quickest way to get an answer that matches the actual problem. Link to comment https://forums.phpfreaks.com/topic/115420-solved-php-echoing-src/#findComment-593359 Share on other sites More sharing options...
abch624 Posted July 18, 2008 Author Share Posted July 18, 2008 You see why I cannot post my whole code is because It is copyrighted to me and a friend and hence we cannot afford code going on a forum!!!!! I have been asked the same question many times..... Thanks for the look - Zahid Link to comment https://forums.phpfreaks.com/topic/115420-solved-php-echoing-src/#findComment-593368 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.