Closed Thread Icon

Topic awaiting preservation: PHP or ASP in database field (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=12490" title="Pages that link to Topic awaiting preservation: PHP or ASP in database field (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: PHP or ASP in database field <span class="small">(Page 1 of 1)</span>\

 
Lurch
Paranoid (IV) Inmate

From: Behind the Wheel
Insane since: Jan 2002

posted posted 10-24-2002 19:26

Is there a way to pull asp or php from a db then run it? for example if I have a field containing the copy for a page, and I want to have php in that field, so it runs with the rest of the php on the page that retreived that db field. know what I mean?


--Lurch--

bitdamaged
Maniac (V) Mad Scientist

From: 100101010011 <-- right about here
Insane since: Mar 2000

posted posted 10-25-2002 03:02

It's dangerous and should be used very carefully (sloppy code could allow users to insert there own code)

but almost all laguages have some form of an eval function which executes the arguments.



.:[ Never resist a perfect moment ]:.

WarMage
Maniac (V) Mad Scientist

From: Rochester, New York, USA
Insane since: May 2000

posted posted 10-25-2002 05:53

Yeah, make sure that those entering code could not put one of those great "unlink -rf /*" type pieces of code into your database. That could cause quite a problem.

Lurch
Paranoid (IV) Inmate

From: Behind the Wheel
Insane since: Jan 2002

posted posted 10-25-2002 06:26

thanks, I'll play around with that later...

I'm the only one who'll be entering data, so I should be alright... I suppose I could use a bbcode type syntax and only eval certain things..

--Lurch--

« BackwardsOnwards »

Show Forum Drop Down Menu