UbH Posted April 8, 2008 Share Posted April 8, 2008 Hi everyone, I am currently creating a CMS for my sites navigation but I am having a little problem. The CMS capabilitys include adding more menu items and this mean setting a few PHP variables that get inserted into MySQL to HTML markup like the following: $openLinkVar = "<a href="; $linkVar = "main.php?id=1"; $closeLinkVar = ">"; $linkNameVar = "Some Link"; $finishLinkVar = "</a>"; The problem is that after being sent to MySQL the link wont work on my test page. The source of the test page shows the output as the following: <a href=main.php?id=1>Some Link</a> When I enter these variables into MySQL manually with proper HTML link quotes the link works : <a href="main.php?id=1">Some Link</a> So obviously its because I cant have quotes for my HTML link variables, how do I get around this? Link to comment https://forums.phpfreaks.com/topic/100226-solved-setting-variables-to-html-markup/ Share on other sites More sharing options...
UbH Posted April 8, 2008 Author Share Posted April 8, 2008 FIX: pull the HTML from a new MySQL table and query it into the variables that I then use to insert into my navigation table. Still feels like a wast of a data table though. Thanks. UbH Link to comment https://forums.phpfreaks.com/topic/100226-solved-setting-variables-to-html-markup/#findComment-512506 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.