I want to store a function in a MySQL Database. Like this:

<?php
$query = "SELECT * FROM items WHERE item_id='$_GET['item_id']'";
$item = mysql_fetch_assoc(mysql_query($query));
$action = $item['action'];
$action;
?>

So in the database, $item is

header('Location:blah.html');


But it could be ANY function, see. I just want to know how I could do that.

And it has to perform the function.

Recommended Answers

All 2 Replies

Ok.
This is an admin function, so I'm not too worried.

But I thought about using eval(); , I think that would work. I just learned that today. :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.