473,404 Members | 2,195 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

Parsing PHP sourced from blob

When a php statement is "part" of a markup snippet in a mysql database
table field, what must be done to have the php parse in the document.
The php tags are being displayed

A simple demo demonstrating my problem is at
http://www.boclair.com/test/blobvars.php

Louise
Jul 17 '05 #1
4 2229
boclair wrote:
When a php statement is "part" of a markup snippet in a mysql database
table field, what must be done to have the php parse in the document.
The php tags are being displayed

A simple demo demonstrating my problem is at
http://www.boclair.com/test/blobvars.php

Louise


Try looking here: <http://uk.php.net/eval>

--
phil [dot] ronan @ virgin [dot] net
http://vzone.virgin.net/phil.ronan/
Jul 17 '05 #2
Try http://www.php.net/eval, the eval() function should do the job!

http://www.DevPlug.com --Connecting Developers
Posted from: http://www.devplug.com/ftopic{TOPIC_ID}.htm
Jul 17 '05 #3
Philip Ronan wrote:
boclair wrote:

When a php statement is "part" of a markup snippet in a mysql database
table field, what must be done to have the php parse in the document.
The php tags are being displayed

A simple demo demonstrating my problem is at
http://www.boclair.com/test/blobvars.php

Louise

Try looking here: <http://uk.php.net/eval>


Thanks but I need more help

I applied eval as

if (ISSET($myrow['detail'])){$detail=$myrow['detail'];}
$detail=addslashes($detail);
eval("\$detail = \"$detail\";");

where detail is the blob field.

The result is at http://www.boclair.com/test/blobvars2.php
The image src is line (bolded) still wrong. The value of the page
variable is being contained in the PHP tags.

By removing the PHP tags on the src statement, the document renders
correctly as shown at http://www.boclair.com/test/blobvars3.php

By also removing the php tags in the style attributes, these are also
rendered correctly as shown at http://www.boclair.com/test/blobvars4.php

Does this mean that PHP tagging should not be used in blob values?

Louise
Jul 17 '05 #4
boclair wrote:
Does this mean that PHP tagging should not be used in blob values?


I guess so. Perhaps you could use a regular expression to split the
fragments apart so that the content of the php tags is sent to the eval()
function and everything else is sent out as literal text.

--
phil [dot] ronan @ virgin [dot] net
http://vzone.virgin.net/phil.ronan/
Jul 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Carolyn Longfoot | last post by:
Help! This is driving me crazy... I'm trying to read a BLOB from a db and display it in a browser, like so: $query="SELECT blob from table where blob_id=9"; $result=mysql_query($query);...
2
by: Antonio D'Ottavio | last post by:
Good Morning, In my web page I've a datalist that is sourced by a database, the problem is that I want that one of the column of the datalist contain a dropdownbox that also is sourced by a table...
0
by: Antonio D'Ottavio | last post by:
Good Morning, In my web page I've a datalist that is sourced by a database, the problem is that I want that one of the column of the datalist contain a dropdownbox that also is sourced by a table...
3
by: Carmine | last post by:
I have to add a date column to a db2/zos table with a blob column. Can I rename the blob table to old, create a new table with the date column, then insert/select the data from the old table? ...
2
by: Trip | last post by:
Hello all, Is there anyway to store an array to MS Access 2002 without parsing the entire array row-by-row. For example, Oracle allows you to store BLOBs (binary large objects). I would like...
2
by: Vinciz | last post by:
hi guys... im new in java and i would love to learn some of these... basically i got a sample code to retrieve the blob from the mysql. however, i dont really know what to do with these...
9
by: matt | last post by:
hello, im doing my first ASP.NET app that inserts & retrieves files from Oracle (no need for a discussion on *that*!). i learned first-hand of the somewhat awkward technique for inserting...
22
by: yang__lee | last post by:
Hi, I hope you may help me. Please check the attached text file. Actually its a report file with some headers information and them report is in tabular format. I want to parse each row and...
4
by: skunapareddy | last post by:
I am needing to read a blob from database and pass it to another java program. I researched internet and found a program that reads a file on the client pc and gives bytes, but when I modified the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.