I have a site in database (writes the page code inside the table), example:
<html>
...
This code above I saved in a field inside the table, and to display, I do it normally and everything comes right, however I need the following:
Inside the code has for example h1 date() h1
(I took because here it is understood as title
Summary:
When I do <%=%>
is the same as response.write, then how do I put this variable inside the code that is already in the database?
I've tried everything when it's done and everything I put is printed on the screen exactly as I put it, in the example above, it's written on the page exactly that, date () inside h1.
detailed ..
I created a database inside another domain that I have and in it I created a table with longtext field and inside it I created the following:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title> Login</title>
<body class="gray-bg">
<div><h1 class="logo-name"></h1></div>
<%=date()%> (aqui é onde já testei de tudo (risos)
</body>
</html>
... (página não esta completa, mas só foi para entender)
and within the domain I want the page I created the following:
SQLLerDados = "select * FROM sisindex"
Set RSLerDados=Server.CreateObject("ADODB.Recordset")
RSLerDados.Open SQLLerDados, objConnPagina
if RSLerDados.eof then
response.End()
else
codigoPagina = RSLerDados("codigoPagina")
response.write codigoPagina
end if
Set RSLerDados = Nothing
response.End()
That is, it goes into my database and takes the page to be displayed, except that this page is in ASP and has commands and functions in it and the response.write is understood as independent text of how I put the ASP variables , understood? or think I did not explain right. Thanks