stegers72 Posted September 18, 2013 Share Posted September 18, 2013 Hello ; I am trying to echo an image with url, but I keep getting an error, I think my parameter .$modelurl.$item['performerid'].$modelpageext is not correct. Anyone that can help me out a bit ? echo '<img src="'.$file.'" width=\"160\" height=\"120\" border=\"0\" alt=\"\">'; <a href=\".$modelurl.$item['performerid'].$modelpageext\">"; Many thanks in advance ; Pascal Quote Link to comment Share on other sites More sharing options...
cataiin Posted September 18, 2013 Share Posted September 18, 2013 (edited) try: echo "<img src='".$file."' width='160px' height='120px' border='0px' alt='' />"; echo "<a href='".$modelurl.$item['performerid']."'>".$modelpagenext."</a>"; Edited September 18, 2013 by cataiin Quote Link to comment Share on other sites More sharing options...
AbraCadaver Posted September 18, 2013 Share Posted September 18, 2013 Need more info. What do those vars contain and what should the href look like? And are you trying to make a clickable image? Quote Link to comment Share on other sites More sharing options...
stegers72 Posted September 18, 2013 Author Share Posted September 18, 2013 Need more info. What do those vars contain and what should the href look like? And are you trying to make a clickable image? Thanks for your reply, yes I am trying to make a clickable image $ext = '.jpg'; $modelurl = 'http://www.test-url/'; $modelpageext = '.php'; Quote Link to comment Share on other sites More sharing options...
cataiin Posted September 18, 2013 Share Posted September 18, 2013 what returns: echo "<a href='".$modelurl.$item['performerid'].$modelpagenext."'><img src='".$file."' width='160px' height='120px' border='0px' alt='' /></a>"; ? Quote Link to comment Share on other sites More sharing options...
AbraCadaver Posted September 18, 2013 Share Posted September 18, 2013 What should the href look like? Quote Link to comment Share on other sites More sharing options...
stegers72 Posted September 18, 2013 Author Share Posted September 18, 2013 This seems to do the job ... Many thanks for the help what returns: echo "<a href='".$modelurl.$item['performerid'].$modelpagenext."'><img src='".$file."' width='160px' height='120px' border='0px' alt='' /></a>"; ? Quote Link to comment Share on other sites More sharing options...
AbraCadaver Posted September 18, 2013 Share Posted September 18, 2013 Model? Performer? Is this a porn gallery? Quote Link to comment Share on other sites More sharing options...
cataiin Posted September 18, 2013 Share Posted September 18, 2013 Quote Link to comment Share on other sites More sharing options...
jazzman1 Posted September 19, 2013 Share Posted September 19, 2013 (edited) $ext = '.jpg'; $modelurl = 'http://www.test-url/'; $modelpageext = '.php'; @stegers72, using a "http://" prefix inside a "href" attribute tells the browser, that this searchable file/directory is outside of this server. It's not good for performance, but there is no problem if you want to use it, of course. @cataiin, Abra is correct by saying to use meaningful variable names. Edited September 19, 2013 by jazzman1 Quote Link to comment Share on other sites More sharing options...
stegers72 Posted September 19, 2013 Author Share Posted September 19, 2013 @stegers72, using a "http://" prefix inside a "href" attribute tells the browser, that this searchable file/directory is outside of this server. It's not good for performance, but there is no problem if you want to use it, of course. @cataiin, Abra is correct by saying to use meaningful variable names. Thanks for the help. I appreciate it. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.