![]() |
|
| |||||||
| Notices |
| mySQL & PHP Discussions, information and help with mySQL and PHP. |
![]() |
| | Thread Tools |
|
#1
| ||||
| ||||
|
Hi Folks, Please help me with this - I need to change the text sizes and colour but do not know where to insert this information. You can see what is currently happening at www.gnjgf.co.za/entryformmysql.php !-------------------------------------------------------------------> <! THIS SECTION FETCHES THE INFORMATION FROM THE TABLE > <!-------------------------------------------------------------------> <?php while($row=mysql_fetch_array($result)){ echo "</td><td>"; echo $row['name']; echo "</td><td>"; echo $row['surname']; echo "</td><td>"; echo $row['my_handicap_is']; echo "</td><td>"; echo $row['i_wish_to_play']; echo "</td></tr>"; } echo "</table>"; ?> |
|
#2
| ||||
| ||||
|
It depends on how your going to change the formatting, if you are going to use css I would do something like <?php while($row=mysql_fetch_array($result)){ echo '<tr><td class="name">'; echo $row['name']; echo '</td><td class="surname">'; echo $row['surname']; echo '</td><td class="handicap">'; echo $row['my_handicap_is']; echo '</td><td class="wish_to_play">'; echo $row['i_wish_to_play']; echo '</td></tr>'; } echo '</table>'; ?> Also note the blue text. You had a closing tag for a column instead of the opening tag for the row. For the actual formatting you would then add this between your head tags <style type="text/css"> .name { color: #0000FF; font-size: 12px; } .surname { color: #0000FF; font-size: 12px; } .handicap { color: #0000FF; font-size: 12px; } .wish_to_play { color: #0000FF; font-size: 12px; } </style>
__________________ Register/Login Script Do you use a Password Protected Directory? Need a way to allow users to make their own account, try my .htaccess Login Script |
|
#3
| ||||
| ||||
|
Hi, Thanks for the reply but unfortunatly no impact to making the changes. |
|
#4
| ||||
| ||||
|
Hi Me again, Sorry it was finger problems on my side. Looking much better - thank you. Next port of call is to set the width of the last column in order that the text does not wrap or seems to wrap onto the next line. |
|
#5
| ||||
| ||||
|
In your column header you can just change the <td> tags to look like <td width="400">{column_title}</td> Changing 400 to the number of pixels you want the width to be
__________________ Register/Login Script Do you use a Password Protected Directory? Need a way to allow users to make their own account, try my .htaccess Login Script |
|
#6
| ||||
| ||||
|
Thanks for the prompt reply. I do not know where my column headers are. I have a section in that looks like this: <!-------------------------------------------------------------------> <! THIS SECTION CHANGES WHAT THE TABLE LOOKS LIKE > <!-------------------------------------------------------------------> <table border=3 width="35%" cellspacing=0 style="background-color:#F0F8FF;" > <!-------------------------------------------------------------------> <! THIS SECTION CHANGES THE MAIN HEADING > <!-------------------------------------------------------------------> <caption><b><font style="font-size:12px" color="#00008B" face="Arial"> TOURNAMENT ENTRIES</font><b><caption> <!-------------------------------------------------------------------> <!--------THIS SECTION CHANGES THE ACTUAL COLUMN HEADINGS------------> <!-------------------------------------------------------------------> <tr> <th><b><font style="font-size:11px" color="#00008B" face="Arial">NAME</font></b></th> <th><b><font style="font-size:11px" color="#00008B" face="Arial">SURNAME</font></b></th> <th><b><font style="font-size:11px" color="#00008B" face="Arial">HANDICAP</font></b></th> <th><b><font style="font-size:11px" color="#00008B" face="Arial">TOURNAMENT</font></b></th> </tr> |
|
#7
| ||||
| ||||
|
Hi, Progressing slowly but in the right direction. The value seen below as 35% only needs to be ammended to a higher value say 85% and this widens the table. It seems so simple when one knows how. Thanks for your support |
|
#8
| ||||
| ||||
|
Hi, New question on same page.
|
|
#9
| ||||
| ||||
|
<th> tags can use the width attribute as well. The 35% table width makes it take only 35% of the available width (this would be the page width unless the table is wrappped in another element which has a width set). You can set the 35% to something larger, or remove the width="35%" from the <table> tag and only define the width in the the <th> tags You can use php to sort the results on the page request, or javascript to do sorting with the loaded data. To dump the table's data into an excel file by exporting it in phpmyadmin
__________________ Register/Login Script Do you use a Password Protected Directory? Need a way to allow users to make their own account, try my .htaccess Login Script |
|
#10
| ||||
| ||||
|
Hi, So then if I am not misunderstood I can insert the <td>. . . . </td) btween the <th> marks and I should get the result I am looking for regarding my column widths ? My thought behind the sorting is to allow the table to sort into tournaments at a set time and date. This will mean that a date will be specified on the entry form as well as the time and the entry form page will close at that time and the sort will happen similtaneously. If there are 5 tournaments it will do the same. The dump is possible via phpadmin and the sorting can also be done there - I am just looking at automating this process and that way there is less traffic by admin people to the backend of this process. Thanks again for the help |
|
#11
| ||||
| ||||
|
Hi, Well the progress is till good. Using Phpadmin I have managed to get the page to sort as I wanted and the overall look is promising. Is there anyone who can help me with the other remaining issues |
|
#12
| ||||
| ||||
|
You wouldn't added a <td></td> tag inside a <th></th>, I was just saying the inner properties such as <td width="300"> also work in a <th> tag, so you just need to make it <th width="#width#"> changing #width# to either a number in pixels or percent
__________________ Register/Login Script Do you use a Password Protected Directory? Need a way to allow users to make their own account, try my .htaccess Login Script |
|
#13
| ||||
| ||||
|
Hi, Please let us know what this is? |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |