Welcome to Dream.In.Code
Getting PHP Help is Easy!

Join 136,579 PHP Programmers for FREE! Get instant access to thousands of PHP experts, tutorials, code snippets, and more! There are 1,948 people online right now. Registration is fast and FREE... Join Now!




applying style to a fieldset

 
Reply to this topicStart new topic

applying style to a fieldset

dms02x
5 Oct, 2008 - 03:17 AM
Post #1

New D.I.C Head
*

Joined: 8 Feb, 2008
Posts: 18

echo'<fieldset style="width: 200px;">
<legend>Sales by Payment</legend>


while($row = mysql_fetch_array($result))
{
echo "Total ". $row['module']. " = P". $row['SUM(total_paid)'];
echo "<br />";
}
</fieldset>';


can anyone help me my heads aching, i cant seen to put style on this loop fieldset wont apply, pls help im just a beginer
User is offlineProfile CardPM
+Quote Post

dms02x
RE: Applying Style To A Fieldset
5 Oct, 2008 - 03:56 AM
Post #2

New D.I.C Head
*

Joined: 8 Feb, 2008
Posts: 18

echo'<fieldset style="width: 200px;">
<legend>Sales by Payment</legend>


while($row = mysql_fetch_array($result))
{
echo "Total ". $row['module']. " = P". $row['SUM(total_paid)'];
echo "<br />";
}
</fieldset>';


can anyone help me my heads aching, i cant seen to put style on this loop fieldset wont apply, pls help im just a beginer
User is offlineProfile CardPM
+Quote Post

Hary
RE: Applying Style To A Fieldset
5 Oct, 2008 - 04:29 AM
Post #3

D.I.C Head
**

Joined: 23 Sep, 2008
Posts: 205



Thanked: 15 times
My Contributions
a) Please use a better topic title.

cool.gif Where is your SQL query, where is your code. This is too little information to help you.

I think you need to change your SQL query,
"SUM(total_paid)" to "SUM(total_paid) AS total", then you can use $row['total'], you cant use SQL syntax in php variables
User is offlineProfile CardPM
+Quote Post

Moonbat
RE: Applying Style To A Fieldset
5 Oct, 2008 - 06:52 AM
Post #4

D.I.C Regular
Group Icon

Joined: 30 Jun, 2008
Posts: 391



Thanked: 22 times
Dream Kudos: 600
My Contributions
Try using an external stylesheet, instead of the inline CSS you are using now.
User is offlineProfile CardPM
+Quote Post

BetaWar
RE: Applying Style To A Fieldset
5 Oct, 2008 - 07:24 AM
Post #5

#include <soul.h>
Group Icon

Joined: 7 Sep, 2006
Posts: 2,026



Thanked: 82 times
Dream Kudos: 1175
My Contributions
The problem is the number of errors you have in your code, you are missing a TON of quotes in the correct places:

CODE
echo'<fieldset style="width: 200px;">
<legend>Sales by Payment</legend>


while($row = mysql_fetch_array($result))
{
echo "Total ". $row['module']. " = P". $row['SUM(total_paid)'];
echo "<br />";
}
</fieldset>';


Should look like this:
CODE
echo '<fieldset style="width: 200px;">
<legend>Sales by Payment</legend>';

while($row = mysql_fetch_array($result)){
  echo "Total ". $row['module']. " = P". $row['SUM(total_paid)']."<br />";
}
echo '</fieldset>';


Hope that helps.
User is offlineProfile CardPM
+Quote Post

BetaWar
RE: Applying Style To A Fieldset
5 Oct, 2008 - 07:28 AM
Post #6

#include <soul.h>
Group Icon

Joined: 7 Sep, 2006
Posts: 2,026



Thanked: 82 times
Dream Kudos: 1175
My Contributions
Also, lets try to not create duplicate topics:
http://www.dreamincode.net/forums/showtopic66154.htm

It makes it a lot easiet on everyone to help you out.
User is offlineProfile CardPM
+Quote Post

PsychoCoder
RE: Applying Style To A Fieldset
5 Oct, 2008 - 07:51 AM
Post #7

using DIC.Core;
Group Icon

Joined: 26 Jul, 2007
Posts: 8,997



Thanked: 125 times
Dream Kudos: 8625
Expert In: VB, VB.Net, C#, SQL, ASP, ASP.Net, Web Development, HTML, CSS, Win32 API, Javascript, mySQL, J#, Boo.Net

My Contributions
Topics merged, please don't create duplicates smile.gif
User is offlineProfile CardPM
+Quote Post

Jayman
RE: Applying Style To A Fieldset
5 Oct, 2008 - 08:44 AM
Post #8

Student of Life
Group Icon

Joined: 26 Dec, 2005
Posts: 6,947



Thanked: 42 times
Dream Kudos: 500
Expert In: C#, VB.NET, Java

My Contributions
Topic renamed to be more descriptive of the problem.
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/3/08 12:27AM

Live PHP Help!

PHP Tutorials

Reference Sheets

PHP Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month