Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

link php e html for new apprenticeship programmer


luigicosta

Recommended Posts

I can not write in php it seems well established

where I'm wrong? This piece of code?

thanks

 

<div class="grid_24 ui-widget infoBoxContainer">
 <div class="ui-widget-header infoBoxHeading">   <a href="' . tep_href_link(FILENAME_SHIPPING) . '">Spedizioni</a> - <a href="' . tep_href_link(FILENAME_PRIVACY) . '">Condizioni</a> - <a href="' . tep_href_link(FILENAME_CONDITIONS) . '">Privacy</a> - <a href="' . tep_href_link(FILENAME_CONTACT_US) . '">Contattaci</a> - <a href="' . tep_href_link(FILENAME_SITEMAP_SEO) . '">Mappa sito</a></div>
</div>

Link to comment
Share on other sites

There are various ways to do it. here's one way

<div class="ui-widget-header infoBoxHeading">   <a href="<?php echo tep_href_link(FILENAME_SHIPPING); ?>">Spedizioni</a> - <a href="' . tep_href_link(FILENAME_PRIVACY) . '">Condizioni</a> - <a href="' . tep_href_link(FILENAME_CONDITIONS) . '">Privacy</a> - <a href="' . tep_href_link(FILENAME_CONTACT_US) . '">Contattaci</a> - <a href="<?php echo tep_href_link(FILENAME_SITEMAP_SEO); ?>">Mappa sito</a></div>

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Any php code need to be within <?php your code here ?> tags. For example the tep_href_link() function you use.

 

maybe you are already in php mode for the code you posted, it's not visible from this snipset

Link to comment
Share on other sites

Your original post's code assumes that you're already in a PHP section (<?php) and that you're printing out a string: echo ' . And after your code, the string is ended: '; . In other words, your code is a mixture of PHP and HTML, so it must be within a string in a PHP section.

 

At a minimum:

echo '
<div class="grid_24 ui-widget infoBoxContainer">
 <div class="ui-widget-header infoBoxHeading">   <a href="' . tep_href_link(FILENAME_SHIPPING) . '">Spedizioni</a> - <a href="' . tep_href_link(FILENAME_PRIVACY) . '">Condizioni</a> - <a href="' . tep_href_link(FILENAME_CONDITIONS) . '">Privacy</a> - <a href="' . tep_href_link(FILENAME_CONTACT_US) . '">Contattaci</a> - <a href="' . tep_href_link(FILENAME_SITEMAP_SEO) . '">Mappa sito</a></div>
</div>
';

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...