Thanks I thought it was clientside. I did some more experiementing with my code and I see what the problem is.... Okay I'm doing a template system with it solely because that is easier to edit. So here's my problem. I use addslashes because.... apparently I need it.
Like here...
function doc($filename) {
$data = addslashes(implode('', file($this->path.$this->style."/$filename.html")));
return $data;
}
and I call it with
$bit = $this->doc("header");
eval("\$bit = \"$bit\";"); echo $bit;
That's my code for opening a file and displaying the data.
Here's my code for the html file it's opening
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>ETSU CAMPUS CRUSADE FOR CHRIST: $cru[title]</title>
<link href="$path$style/style.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="$path$style/scripts/dropdown.js">
</script>
$cru[head]
</head>
<body>
<div align="center"><div class="maintable">
<table cellpadding="0" cellspacing="0" width="770">
<tr>
<td class="header" width="770" height="199">
</td>
</tr>
<tr>
<td class="navbar">
<img src="$path$style/images/menulpad.jpg" width="31" height="37"><a href="template.htm" onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, menu1, '150px')" onMouseout="delayhidemenu()"><img src="$path$style/images/menuwhatwho.jpg" width="159" height="37" border="0"></a><a href="template.htm" onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, menu2, '150px')" onMouseout="delayhidemenu()"><img src="$path$style/images/menuwhatwedo.jpg" width="126" height="37" border="0"></a><a href="template.htm" onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, menu3, '150px')" onMouseout="delayhidemenu()"><img src="$path$style/images/menuview.jpg" width="132" height="37" border="0"></a><a href="template.htm" onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, menu4, '150px')" onMouseout="delayhidemenu()"><img src="$path$style/images/menuconnection.jpg" width="115" height="37" border="0"></a><a href="template.htm" onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, menu5, '150px')" onMouseout="delayhidemenu()"><img src="$path$style/images/menujoin.jpg" width="153" height="37" border="0"></a><img src="$path$style/images/menurpad.jpg" width="54" height="37"></td>
</tr>
<tr>
<td class="bluediv">
</td>
</tr>
<tr>
<td class="whitebg">
Now what happens is those '150px' get \'150px\' which is because of the addslashes I presume but without them the script doesn't even run... well it does but full of errors.
How can I get it to eval without adding the slashes before the ( ' ) or whatever.
See this script usually works because I don't use ' in my html I just use ". But when one of those ' get in the code it goes all to heck. What's a better way of doing this?
I added stripslashes($bit) to the rndr function of the class. It works. I don't know how effective of an idea this is but it does work.