Jump to content

using BLOB in dynamic content


dflow

Recommended Posts

im trying to create a text template where the name of a city is replaced according to the url parameter $_GET from the city list tbl

 

i have uploaded text in binary code to mysql as BLOB

 

i get the text but not the city name that should be echoed, it is blank

 

for example

great things to see in  <?php echo $RsCity['CityName']; ?>

Link to comment
https://forums.phpfreaks.com/topic/157809-using-blob-in-dynamic-content/
Share on other sites

personally I would use [CITYNAME] in the text and preg_replace it.  Much cleaner than eval.

 

edit:

 

I guess str_replace would be better than preg since its exact string search.

 

ok i have tried both BLOB and TEXT fields structures

with the following code

<?php
$str="[CITYNAME] is a nice place to visit";

$cn="Paris";
$text=str_replace("[CITYNAME]", $cn, $str);
echo $text."<br>";
?>

 

i echo the variable like this

<?php echo $row_RsEvent_Types['textcontent']; ?>

 

i get

<td>";
?>

</td>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.