Hi there. Can anyone recognize a problem with this code? The page is not working and I can't figure it out.

print "Content-Type: text/html\n\n";

print "<html>\n";
print "<body>\n";
print ("<br><H1>Welcome $0</H1><br>\n");

$sth=$dbh->prepare("update breeder set breed = '$p1', breeder_name = '$p2', county = '$p3', phone = '$p4' where id = '$p0'");
$sth->execute;
$sth->finish;

$sth=$dbh->prepare("select * from breeder where id = '$p0'");
$sth->execute;

while (($p0,$p1,$p2,$p3,$p4) = $sth->fetchrow()) {
print "<tr><td>ID = $p0</td>";
print "<td>breed = $p1</td>";
print "<td>breeder_name = $p2</td>";
print "<td>county = $p3</td>";
print "<td>phone = $p4</td></tr>";
}
$sth->finish;
print "</body>\n";
print "</html>\n";
$dbh->disconnect;

If you want help, post the entire script, and use CODE tags.

thanks, I figured out the problem.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.