brianlange Posted November 2, 2010 Share Posted November 2, 2010 I need to insert the following html template into mysql. mysql_real_escape_string or addslashes don't seem to get the job done. It previously worked on a server that had magic_quotes turned on. -Brian <html> <head> <!-- <link rel="StyleSheet" type="text/css" href="http://www.realtown.com/public/styles/blogs/templates/simple-green.css" /> --> <title><%Title%></title> <style type="text/css"> /*+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ Common Elements */ *{ margin: 0; padding: 0; } body { background: url(http://www.realtown.com/public/images/blogs/templates/simple/striped-pattern.png); font: 15px Arial, sans sarif; text-align: center; } h3 { font-size: 17px; color: #ca8500; } a{ color: #ca8500; } a:link { color: #ca8500; } a:visited { color: #336699; } a:hover { color: #3399FF; } img{ border: none; } ul{ list-style-image: url(http://www.realtown.com/public/images/blogs/templates/simple/arrow-right.png); list-style-position: inside; } font.gray { color: #AAAAAA; } table tr td{ padding: 10px 0; } td.bold{ font-size: 14px; } .clear{ clear: both; } /*+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ Containers */ #container{ background: url(http://www.realtown.com/public/images/blogs/templates/simple/content-bkrd.png); width: 814px; margin: 0px auto; border-bottom: 1px solid #9db766; text-align: left; } #header{ position: relative; left: 7px; width: 801px; height: 128px; background: url(http://www.realtown.com/public/images/blogs/templates/simple/header.png) 0 0 no-repeat; padding-top: 10px; color: #dc6800; } #mid-wrapper{ /***Adds Global Padding to entire Mid Section*/ padding: 10px 15px; } #content{ float: left; width: 530px; padding-left: 10px; } #nav{ float: right; width: 200px; } #footer{ clear: both; padding: 20px 0 25px 0; font-size: 12px; text-align: center; color: #666; } /*+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ Header */ #header h2, #header h2 a{ margin-top: 15px; font: normal 26px; color: #dc6800; text-decoration: none; } #header h2 a:hover{ text-decoration: underline; } #header span{ font-size: 15px; color: #ca7200; font-weight: normal; } #header div.avatar{ float: left; margin: 5px; } #header div.avatar img{ margin: 0 10px; height: 90px; width: auto; border: 1px solid #9cc249; } /*+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ Entry */ .entry{ margin-bottom: 25px; } .entry small{ display: block; font-size: 12px; color: #636363; margin: 0 0 5px 1px; } .entry div.entry-options, .entry div.entry-options a{ margin: 7px 0 5px 0; color: #ca8500; font-weight: bold; font-size: 14px; } .entry div.last-next{ margin: 10px auto; } /*+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ Navigation */ #nav dl{ margin-top: -35px; padding-bottom: 5px; background: url(http://www.realtown.com/public/images/blogs/templates/simple/right-nav.png) 0 0 repeat-y; } #nav dl dt, #nav dl dd{ padding-left: 28px; } #nav dl dt{ padding-left: 17px; margin-top: 35px; padding-bottom: 4px; color: #ca8500; font-size: 16px; } #nav dl dd, #nav dl dd a{ color: #213000; } div.comments{ margin-top: 20px; } </style> </head> <body> <div id="container"> <div id="header"> <div class='avatar'><img src='<%Avatar%>' border='0' width='100'></div> <h2><a href='<%MainPageURL%>'><%Title%></a></h2> <span><%Description%></span> </div> <div id="mid-wrapper"> <div id="nav"> <dl> <dt>Recent Entry <RecentEntry> <dd> <%RecentEntryTitle%> </RecentEntry> <dt>Categories <Categories> <dd><%Categories%> </Categories> <dt>Favorite Links <Favlinks> <dd><%Favlinks%> </Favlinks> <dt>Links <dd><a href='<%MainPageURL%>'>Home</a> <dd><a href='<%ProfileURL%>'>View my profile</a> <dd><a href='<%ArchiveURL%>'>Archives</a> <dd><a href='mailto:<%Email%>'>Email Me</a> <dd><a href='http://www.realtownblogs.com' target='_blank'>Blog Manager</a> <dt><%RSS%> </dl> </div> <div id="content"> <!-- NOT DISPLAYING ???--> <IfArchivePage> <h3>Archives</h3> <%ArchiveInfo%> </IfArchivePage> <!-- NOT DISPLAYING ???--> <Entry> <div class="entry"> <h3><%EntryTitle%></h3> <small><%EntryDate%></small> <p><%EntryBody%></p> <div class="entry-options"> <IfCommentsAllowed><IfMainPage><a href='<%EntryURL%>'><%EntryCommentCount%> Comments</a> </IfMainPage><IfCommentPostAllowed> | <a href='<%CommentPostURL%>'>Post A Comment!</a></IfCommentPostAllowed> <IfMainPage> | </IfMainPage></IfCommentsAllowed> <IfMainPage><a href='<%EntryURL%>'>Permanent Link</a></IfMainPage> </div> <strong>View more entries tagged with:</strong> <%Tags%> <IfEntryPage> <IfCommentsAllowed> <Comment> <div class="comments"> <h3><%CommentTitle%></h3> Posted by <%CommentAuthor%> <%CommentAuthorIP%> <small><%CommentDate%></small> <%CommentBody%> <div class="entry-options"> <a href='<%CommentURL%>'>Permanent Link</a> <CommentEdit>Edit</CommentEdit> <CommentDelete>Delete</CommentDelete> </div> </div> </Comment> </IfCommentsAllowed> </IfEntryPage> </div><!-- Entry Ended --> </Entry> </div> <IfPages> <div class="last-next"> <LaterLink><img src="http://www.realtown.com/public/images/blogs/templates/simple/arrow-left.png" /> Last Page</LaterLink> | <EarlierLink>Next Page <img src="http://www.realtown.com/public/images/blogs/templates/simple/arrow-right.png" /></EarlierLink> </div> </IfPages> </div> <!-- Mid Wrapper --> <div id="footer"> Copyright © 2008 InternetCrusade.com </div> </div> <!-- Ends Containter --> </Entry> </body> </html> Quote Link to comment https://forums.phpfreaks.com/topic/217610-mysl_real_escape_string-and-add_slahes/ Share on other sites More sharing options...
trq Posted November 3, 2010 Share Posted November 3, 2010 What error are you getting? Quote Link to comment https://forums.phpfreaks.com/topic/217610-mysl_real_escape_string-and-add_slahes/#findComment-1129793 Share on other sites More sharing options...
brianlange Posted November 3, 2010 Author Share Posted November 3, 2010 Add now it seems to be working. Not sure what changed. Thank you for responding. -Brian Quote Link to comment https://forums.phpfreaks.com/topic/217610-mysl_real_escape_string-and-add_slahes/#findComment-1129987 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.