[PHP] Formatting problem
I feel kinda dumb for posting this but here it is... I am trying to query a table then format the results so it looks like the rest of the site and the darn delete button to remove db entries keeps showing up at the top. Here is the code... Thanks in advance. Jas ?php require '../scripts/db.php'; $result = mysql_query(SELECT * FROM cur_inv,$dbh) or die(Could not execute query, please try again later); echo table border=\0\ class=\table-body\ width=\100%\form name=\rem_inv\ method=\post\ action=\done2.php3\ trtd align=\center\ colspan=\2\font size=\4\BCurrent Inventory/B/fonthr color=\33\/td/tr; $count = -1; while ($myrow = mysql_fetch_row($result)) { $count ++; echo trtd width=\30%\BType Of Car: /B/tdtd; printf(mysql_result($result,$count,car_type)); echo /tdtdinput type=\checkbox\ name=\car_type\ value=\checkbox\remove/td /tr\n; echo trtd width=\30%\BModel Of Car: /B/tdtd; printf(mysql_result($result,$count,car_model)); echo /td/tr\n; echo trtd width=\30%\BYear Of Car: /B/tdtd; printf(mysql_result($result,$count,car_year)); echo /td/tr\n; echo trtd width=\30%\BPrice Of Car: /B/tdtd$; printf(mysql_result($result,$count,car_price)); echo /td/tr\n; echo trtd width=\30%\BVIN Of Car: /B/tdtd; printf(mysql_result($result,$count,car_vin)); echo /td/trtrtd colspan=\3\hr color=\33\/td/tr\n; } echo input type=\submit\ name=\delete\ value=\delete\/form/table; ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Formatting problem
Your problem is a simple HTML formatting problem - your FORM submit button is inside your TABLE but outside a TD (it's after the final /TR), thus Netscape puts it above the table entirely. -- Jason Murray [EMAIL PROTECTED] Web Developer, Melbourne IT Work now, freak later! -Original Message- From: jas [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 19, 2002 10:23 PM To: [EMAIL PROTECTED] Subject: [PHP] Formatting problem I feel kinda dumb for posting this but here it is... I am trying to query a table then format the results so it looks like the rest of the site and the darn delete button to remove db entries keeps showing up at the top. Here is the code... Thanks in advance. Jas ?php require '../scripts/db.php'; $result = mysql_query(SELECT * FROM cur_inv,$dbh) or die(Could not execute query, please try again later); echo table border=\0\ class=\table-body\ width=\100%\form name=\rem_inv\ method=\post\ action=\done2.php3\ trtd align=\center\ colspan=\2\font size=\4\BCurrent Inventory/B/fonthr color=\33\/td/tr; $count = -1; while ($myrow = mysql_fetch_row($result)) { $count ++; echo trtd width=\30%\BType Of Car: /B/tdtd; printf(mysql_result($result,$count,car_type)); echo /tdtdinput type=\checkbox\ name=\car_type\ value=\checkbox\remove/td /tr\n; echo trtd width=\30%\BModel Of Car: /B/tdtd; printf(mysql_result($result,$count,car_model)); echo /td/tr\n; echo trtd width=\30%\BYear Of Car: /B/tdtd; printf(mysql_result($result,$count,car_year)); echo /td/tr\n; echo trtd width=\30%\BPrice Of Car: /B/tdtd$; printf(mysql_result($result,$count,car_price)); echo /td/tr\n; echo trtd width=\30%\BVIN Of Car: /B/tdtd; printf(mysql_result($result,$count,car_vin)); echo /td/trtrtd colspan=\3\hr color=\33\/td/tr\n; } echo input type=\submit\ name=\delete\ value=\delete\/form/table; ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP]Formatting problem...
hey- this is a little bit off topic, but it relates. I'm pulling a field called info from my db. When I entered the info into the db in the first place, I added the '\n' character so that the HTML result wouldn't be all on one line. The problem is that when the page displays...the text in that particular part of the table doesn't look right...there's a significant space in between the bottom of the cell where there is some text, and all of the other text. I have a feeling it's because of the way the text is written in between the tags.. here's the example: Here's the code that results in the odd formatting... td width=292 bgcolor=#a9a9a9 valign=top font face=verdana,arial size=1 color=#ff?php echo stripcslashes($gdata[info]);?/font /td here's html from when i did this same page without any php elements(nearly the same)... td width=292 valign=top font face=verdana size=1We're playing once again at the Corner area of the Middle East. Show starts at 10pm, free admission. This one is apparently 18+, but if you're a risky person you can try to get in to eat/drink before we play and then stay for the show. /font /td notice that the text in the second one is spaced out on a few lines, but there isn't a line break anywhere...that text in the second example looks correct in the browser... here's the page with the problem: www.fplg.net/gigs.php anyone else have this problem?? chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]