link to php file in mysql cell?

Soldato
Joined
7 Jan 2007
Posts
10,607
Location
Sussex, UK
I'm trying to store the path to another php script within mysql.

Essentially I was thinking I could add "Monday.php" to my field and the call it on my website using:

28. print include $row[weekday'];

However it errors with:


PHP:
Notice:  Undefined index: countdown in C:\wamp\www\import_test.php on line 28
 
I don't think that is the error, can you give us the rest of the code so it's in context?

Are you looking to actually store the contents of the PHP file in the database, or just its location? Either way, can I ask why?
 
Aside from the typo, trying to eval code stored in a database is really bad from both a security and performance perspective.

This whole setup smells funky. Perhaps try to explain what you are trying to achieve as there is most certainly a better way to go about it.
 
Talked to a friend who has pointed me down a proper path.

I need to create more tables in my database.

Gonna have a bash and will report back.
 
Back
Top Bottom