[PHP-DB] DB formatting question

2005-08-27 Thread Chris Payne
Hi there everyone,

 

I’m converting a video website from CGI to use Databases and they want me to
keep their existing layout.  However, I have a slight formatting problem.
I’m using PHP with MySQL and what I have is this:

 

Each page displays 6 videos, 2 are on the first row (Which has 3 columns
with the 2nd one being a hardcoded flash video) so the first 2 videos go on
the left and on the right, then below that is another row with 4 columns
which have to display the other 4 videos.

 

How can I format the table so that when the MySQL data is read in the loop,
it displays the data like this?  I can display it down the page no problem,
but it needs to be 3 columns across on 1 row with the middle column not
having any MySQL data and the 2nd row needs to have 4 videos, 1 in each of
the 4 columns.

 

Does that make sense?

 

Chris


-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.10.16/83 - Release Date: 8/26/2005
 


[PHP-DB] RE : HTML Layout (WAS : DB formatting question)

2005-08-27 Thread Neil Smith [MVP, Digital media]



Message-Id: [EMAIL PROTECTED]
From: Chris Payne [EMAIL PROTECTED]
To: php-db@lists.php.net
Date: Sat, 27 Aug 2005 02:31:13 -0700
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary==_NextPart_000__01C5AAAF.64FE18E0
Subject: DB formatting question

Hi there everyone,

I'm converting a video website from CGI to use Databases and they want me to
keep their existing layout.  However, I have a slight formatting problem.


This is a HTML problem (not PHP or MySQL or even video problem !)


Each page displays 6 videos, 2 are on the first row (Which has 3 columns
with the 2nd one being a hardcoded flash video) so the first 2 videos go on
the left and on the right, then below that is another row with 4 columns
which have to display the other 4 videos.
How can I format the table so that when the MySQL data is read in the loop,


MySQL is unrelated to this, just store the video in 6 variables and 
populate the table cells with the HTML from those.

Any basic tutorial on HTML can show you how to layout  rows and columns.


but it needs to be 3 columns across on 1 row with the middle column not
having any MySQL data and the 2nd row needs to have 4 videos, 1 in each of
the 4 columns.


So like this : (OK ok nested tables aren't elegant, you could use CSS and 
DIVs instead)


!-- Start layout table --
table width=100% border=0 cellspacing=2 cellpadding=2
tr id=row1
td width=33%?=$video_1_html?/td
td width=33%nbsp;/td
td width=33%?=$video_2_html?/td
/tr
tr id=row2
td colspan=3
!-- Start inner video layout table --
table width=100% border=0 cellspacing=0 
cellpadding=2

tr
td 
width=25%?=$video_3_html?/td
td 
width=25%?=$video_4_html?/td
td 
width=25%?=$video_5_html?/td
td 
width=25%?=$video_6_html?/td

/tr
/table
!-- End inner video layout table --
/td
/tr
/table
!-- End video layout table --

HTH
Cheers - Neil 


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] amp;

2005-08-27 Thread Shay
Hi, I'm having trouble getting amp; to work properly. I start with a URL 
that has just  tags. I use str_replace to replace the  with amp;. Now 
this works with URLs that I print as hyperlinks, but the amp; does not 
print if I print the URL as a normal string. If I view the page source the 
amp; is there, but not on the page itself. Anyone know how to fix this? 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Re: amp;

2005-08-27 Thread Tim Van Wassenhove
On 2005-08-27, Shay [EMAIL PROTECTED] wrote:
 Hi, I'm having trouble getting amp; to work properly. I start with a URL 
 that has just  tags. I use str_replace to replace the  with amp;. Now 
 this works with URLs that I print as hyperlinks, but the amp; does not 
 print if I print the URL as a normal string. If I view the page source the 
 amp; is there, but not on the page itself. Anyone know how to fix this? 

If you generate an URL you should use http://www.php.net/urlencode.
If you want to insert that URL in a html page you should use
http://www.php.net/htmlentities.

-- 
Met vriendelijke groeten,
Tim Van Wassenhove http://timvw.madoka.be

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php