Jump to content

storing variable in mysql


r-it

Recommended Posts

i have stored a variable into my database, i would like it to be a variable instead of being plain text, eg. i store $teazer in the db right, and then before i read the database i populate the vaiable $teazer rite, then i want it to come after a certain paragraph on some other page, so i figured the way to do it was to put it inside the db and it will be invoked by that variable, can anyone help

Link to comment
https://forums.phpfreaks.com/topic/55070-storing-variable-in-mysql/
Share on other sites

maybe i'm not making myself clear enough,  its like this;  i have a db with all the text for my webpages, but the main page has to show a teazer of some sort for news, so if the page being read is the main page, i have to read the news table and get the latest news item, thts no problem, but the thing is that the news block must come after the first paragraph, so i thought i'd store the variable name being used to  populate the block into the database field and it would automatically know its a variable, but it just prints it as text

 

 

ne1

you are still not making yourself clear...

 

so i thought i'd store the variable name being used to  populate the block into the database field and it would automatically know its a variable

 

who would know that???

 

Anyway i think i understand a bit what you want here... you want to use the variable variables feature do something like $$var_from_db anyway i still don't see why you want to do this... and i can't understand where your problem is...

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.