You are here: Re: Table in MySql database « All PHP « IT news, forums, messages
Re: Table in MySql database

Posted by J.O. Aho on 07/09/05 16:01

Margaret wrote:
> I am sorry if this is OT and please tell me to go away if it is.
>
> I have a PHP script written by my Nephew (now in the USA working in a
> summer camp so unavailable) which gets information from a database. I
> can add all the stuff I need to the database and in the "longtext" field
> can add html tags and so on and all works fine. But when I try to get a
> table into it I works OK but a heap of <br> are added in before the
> table shows meaning that I have to scroll right down the page to be able
> to see anything.
>
> I've pasted the table into the database at the bottom of the page it
> should be in.
>
> http://www.hampsteadparishchurch.org.uk/
> to see the whole effect please click on "Parish Magazine", July - Summer
> Fair. and scroll down.
>
> I can't see what might be putting all the <br>'s in - it doesn't do it
> on anything except tables.

As I don't know how you have inserted the data into the database, I can't say
what has caused the <br /> to be added, and if you will only use one short
line per cell, there aren't any real point in using <p></p> either, but
together they make the big space between the "cells". The <br /> is already
part of the original list and there it make sense to use it as you don't want
everything in a long line.

Check the php script that is used to display the data and see if it adds the
<br /> and remove it from it and it should display your table in a more proper
way. You can have your eyes open for nl2br() function, which is used to add
<br> to places where there are a line break.


//Aho

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация