Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Hi as a newbie php user and an hardened hardware engineer I am desperate to understand the following problem.
I have many pages with the same basic format, but different content, on a website. Each text <DIV> is generally a different size and so I put [i]height:[/i] and [i]position:[/i] information in the database containing the page content. All works fine EXCEPT for putting dynamic content in the CSS lines of the generated HTML page. For example I use a [i][b]<DIV id="page_container">[/b][/i] for aesthetic and fixed layout reasons.Code: Select all
echo "#page_container {height: 570px;};";Code: Select all
echo "#page_container {height: 570px;};Code: Select all
echo "#page_container {height:";
echo $row[page_height];
echo "px;};";Code: Select all
echo $row['page_height'];
echo "px;};";Code: Select all
echo $row["page_height"];
echo "px;};";Code: Select all
echo "#page_container {height:".$row[page_height]."px;};";gives me a source code with:
Code: Select all
#page_container{height:;};Code: Select all
echo $row[page_height];I have used INT and TEXT types in my MySQL Database both give me the same result, so now I think the only option I haven't yet tried is to put
Code: Select all
#page_container {height: 570px;};I actually need to put several variables in several <STYLE> lines - so the wastage of storage space would be considerable.
Regards Chris
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]