css applied to print statement in php

Discussion in 'CSS' started by malaysiancss, Jul 23, 2010.

  1. #1
    Hi there , im just wondering if anyone can guide for the below problem.

    I want to apply css to text , but im stuck.

    I want to create the style for the word " Email " but its inside the print statement. Each time i change it the php scripts seems not working.


    ----------------------------------------------
    <style type="text/css">
    <!--
    .newsletter {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    color: #FFFFFF;
    }
    .newsletter1 {
    font-family: Arial, Helvetica, sans-serif;
    }
    -->
    </style>
    <?php
    include "admin/connect.php";
    ?>
    <?php
    print "<form action='$yourfilepath/sub.php' method='post'>";
    print "E-mail: <input type='text' name='email' size='30'><br>";
    print "<input type='radio' name='choice' value='sub'>&nbsp;Subscribe&nbsp;&nbsp;&nbsp;&nbsp;";
    print "<input type='radio' name='choice' value='unsub'>&nbsp;Unsubscribe<br>";
    //print "List to subscribe to:<br>";
    $getlists="SELECT * from m_newsletters";
    $getlists2=mysql_query($getlists) or die("Could not get lists");
    //print "<select name='lists'>";
    while($getlists3=mysql_fetch_array($getlists2))
    {
    //print "<option value='$getlists3[newsletterid]'>$getlists3[newslettername]</option>";
    }
    //print "</select><br>";

    print "<input type='submit' name='submit' value='submit'></form>";
    ?>
    ---------------------------------------------------------------------
     
    malaysiancss, Jul 23, 2010 IP
  2. Oxi

    Oxi Peon

    Messages:
    78
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Not sure I see the problem :S , just declare an element around the text with a class

    
    print "<span class='Class'>E-mail:</span><input type='text' name='email' size='30'><br>";
    
    PHP:
    should work just fine..
     
    Oxi, Jul 23, 2010 IP