Forum Moderators: coopster & phranque

Message Too Old, No Replies

a baffling and probably simple problem

         

aline

12:03 am on Apr 27, 2003 (gmt 0)

10+ Year Member



I have a form in my Perl script. Everything works fine except that the submit button stubbornly refuses to be at the bottom of the page after some info retrieved from a database. Here is my code:
#!c:/perl/bin/perl.exe
use DBI;
$,="\t";
print"content-type:text/html\n\n";
print"<html>\n";
print"<body bgcolor=\"fffbec\">";

$db=DBI->connect("dbi:mysql:Web");
$query='select firstname,surname from PERSON';
$s=$db->prepare($query);
$s->execute();
print"<font color=\"990000\"><b><center><font face=\"Comic Sans Ms\"><font size=\"6\">Track a socialite</b></font face></font color></center></font size><br><br>";
print"<b>Select the socialite you'd like to have more detail on and press submit</b><br><br>";

print"<table>";
print"<form action=\"track.pl\" method=\"post\">";

while(@result=$s->fetchrow())

{for($index=0;$index<@result;$index=$index+2)
{

print"<tr><td><input type=\"radio\" name=\"track\" value=\"$result[$index]\"> @result</td></tr>";
print"\n";
}

}
print"<input type=\"submit\"></form></table>";

$s->finish();
$db->disconnect();

Could anyone help me?
Thanks

figment88

12:25 am on Apr 27, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The submit button is nested within the table but it is not in a row.

Try:
print"<tr><input type=\"submit\"></tr></form></table>";

Also, as an aside, people almost always nest the table within the form instead of the otherway around like you have.

ShawnR

12:54 am on Apr 27, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



What a terrible title! "A baffling and probably simple problem" probably describes 90% of the posts in WebmasterWorld (not just the posts to this forum, but to all the forums here, ranging from the technical to the marketing.

(Sorry for being unfriendly... I'm just in a funny mood right now.)

aline

4:29 pm on Apr 27, 2003 (gmt 0)

10+ Year Member



no offence taken, its quite a bad title but it was in truth a very simple problem and quite stupid to forget to add a row!

figment88

11:39 pm on Apr 27, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



well, I take offence.

You take time to respond to an OT post, and you can't even give me a nod.

This type of rudeness is why I usually don't bother helping people out with their "simple problems."

I guess I'll never learn.

aline

11:45 pm on Apr 27, 2003 (gmt 0)

10+ Year Member



well you've totally lost me now!

ShawnR

12:07 am on Apr 28, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi Aline

Figment means that you neglected to say thanks for his/her assistance.

I must apologise. It was my post that degraded the whole tone of this thread in the first place. I guess once the tone was set, Aline responded. (Its natural to forget your manners once you are put on the defensive.)

Sorry

Shawn

aline

9:41 pm on Apr 28, 2003 (gmt 0)

10+ Year Member



Hi Shawn,
yes you are quite right I should have said thank you, I was so excited it was working I forgot my manners!