Donovan Posted January 17, 2008 Share Posted January 17, 2008 Why is this causing me so much trouble. This is from a side menu and I placed a snippet of php code for a link. </ul> <br /> <strong>Files & Links</strong>:<br /> <ul class="bluebullets"> <li>Megamix Case Review</li> <li> <?php $course_id = 12; echo "<a href='../../xxxx/index.php?op=questions&course_id=$course_id'>Questions</a>"; ?> </li> </p> </div> </ul> All that shows up is Questions"; ?> ..not linked at all. Why would this be ignored by the browser? In the browser it is displaying "; from my echo and the closing php tags. I'm using Firefox. Quote Link to comment https://forums.phpfreaks.com/topic/86532-embedded-php/ Share on other sites More sharing options...
PFMaBiSmAd Posted January 17, 2008 Share Posted January 17, 2008 Is the page a .php page or a .htm/.html page? Quote Link to comment https://forums.phpfreaks.com/topic/86532-embedded-php/#findComment-442132 Share on other sites More sharing options...
Donovan Posted January 17, 2008 Author Share Posted January 17, 2008 It is a .html page. Quote Link to comment https://forums.phpfreaks.com/topic/86532-embedded-php/#findComment-442133 Share on other sites More sharing options...
PFMaBiSmAd Posted January 17, 2008 Share Posted January 17, 2008 You either need to rename the file to a .php or you need to configure your web server to parse .html files as php. Quote Link to comment https://forums.phpfreaks.com/topic/86532-embedded-php/#findComment-442149 Share on other sites More sharing options...
inet411 Posted January 17, 2008 Share Posted January 17, 2008 It is a .html page. I copy/paste your code here: http://www.inet411.com/testing/fdsfds.php Show up just fine, let me know if you see it correctly. If not, then it is your browser. If it is showing correctly then it is your server. You say it is a .html file. Is your server set to read .html as .php? Either rename the file to whatever.php or put the following line in your .htaccess file: AddType application/x-httpd-php .php .html .htm That will tell your server to read .html as .php if anything is between the <? and ?> tags in your .html file. Quote Link to comment https://forums.phpfreaks.com/topic/86532-embedded-php/#findComment-442151 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.