SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    Non-Member hyperimage's Avatar
    Join Date
    Dec 2003
    Location
    Croatia
    Posts
    259
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Style problem!!!

    hi!
    i linked the body style directly to mysql table!
    and it gives me only the font color output?
    this is the relative form:
    PHP Code:
    <?php
    $result
    mysql_query("select * from wt_style_design_body order by 'id' desc limit 1");
    while(
    $row mysql_fetch_array($result)) { 
    echo 
    "<body style='background : $row[6];  font-size : $row[9]; color : $row[8]; background-image : url($xpath/$row[5])' leftmargin='$row[1]' topmargin='$row[2]' marginwidth='$row[3]' marginheight='$row[4]'>\n";
    }
    mysql_free_result$result ); 
    ?>
    all of this works but only font-size wont work!!!
    and the field into mysql is (example) 14px so when the form call font-size:$row[9]; it must be font-size:14px; but this wont work!!!
    any suggestion???
    thanx in advance!!!

  2. #2
    SitePoint Zealot
    Join Date
    Dec 2001
    Location
    USA
    Posts
    106
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Place this code somewhere in your file so you can see which values are assigned.

    PHP Code:
    print_r($row); 
    Run the script and make the proper corrections.

  3. #3
    Non-Member hyperimage's Avatar
    Join Date
    Dec 2003
    Location
    Croatia
    Posts
    259
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    the value comes up..that is the strange thing!!!!
    i reload the page and right click view source..and it comes up correctly???
    but no effects!!!!
    in my style.css i removed all body attribute!!!
    so i thought that that was wrong way of doing this!
    so i need more suggestion for fix this mechanism!!!

  4. #4
    Non-Member hyperimage's Avatar
    Join Date
    Dec 2003
    Location
    Croatia
    Posts
    259
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    this is the php output:
    PHP Code:
    <?php 
    $result
    mysql_query("select * from wt_style_design_body order by 'id' desc limit 1"); 
    while(
    $row mysql_fetch_array($result)) { 
    echo 
    "<body style='background : $row[6];  font-size : $row[9]; font-family:$row[7]; color : $row[8]; background-image : url($xpath/$row[5])' leftmargin='$row[1]' topmargin='$row[2]' marginwidth='$row[3]' marginheight='$row[4]'>\n"

    mysql_free_result$result ); 
    ?>
    and this is the html source code of the output above:
    HTML Code:
    <body style='background : #FFCC99;  font-size : 14px; font-family:Times New Roman, Times, serif; color : #993333; background-image : url(/)' leftmargin='' topmargin='' marginwidth='' marginheight=''>
    the font-size and font_family doesnt make any effect????
    other stuff works perfectly!!!
    suggestions?
    thanx in advance!

  5. #5
    Non-Member hyperimage's Avatar
    Join Date
    Dec 2003
    Location
    Croatia
    Posts
    259
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Please!!!

    I REALLY NEED HELP!!!
    why this output wont take effects????????
    thanx


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •