sub cart_previewitem { $id = param('id'); $sth = $dbh->prepare("SELECT * FROM items WHERE id = '$id'"); $sth->execute or die $dbh->errstr; @slog = $sth->fetchrow_array; print qq~ <p><a href="javascript:history.back(1)">Back</a></p> <table align="center" width="100%" cellpadding="4" cellspacing="1" bg +color="#000000"> <tr> <td class="darktext" bgcolor="#FFFFFF"> <font size="2"><b>$slog[2] - $slog[4]<br></b></font> <table align="center" width="100%" cellpadding="4" cellspacing=" +0"> <tr> <td align="center" bgcolor="#FFFFFF"> ~; if($slog[19]) { print "<img src=\"$slog[19]\" border=\"1\">"; } print qq~ </td><td width="100%" bgcolor="#FFFFFF" class="darktext" valign +="top"> <p><b>Description:</b> $slog[5]<br> <b>Price:</b> $slog[3] ~; if($slog[6]) { print "<br><b>Size:</b> $slog[6]"; } if($slog[13] && $slog[14]) { print "<br><b>$slog[13]:</b> $slog[14]"; } if($slog[15] && $slog[16]) { print "<br><b>$slog[15]:</b> $slog[16]"; } if($slog[17] && $slog[18]) { print "<br><b>$slog[17]:</b> $slog[18]"; } print qq~ </p> </td> </tr> </table> ~; if($slog[7] && $slog[8]) { (@nslog) = split(/\n/, $slog[8]); print "<br><b>$slog[7]:</b> <select name=\"$slog[7]\">"; foreach $line (@nslog) { print "<option value=\"$line\">$line</option>"; } print "</select>"; } if($slog[9] && $slog[10]) { (@nslog) = split(/\n/, $slog[10]); print "<br><b>$slog[9]:</b> <select name=\"$slog[9]\">"; foreach $line (@nslog) { print "<option value=\"$line\">$line</option>"; } print "</select>"; } if($slog[11] && $slog[12]) { (@nslog) = split(/\n/, $slog[12]); print "<br><b>$slog[11]:</b> <select name=\"$slog[11]\">"; foreach $line (@nslog) { print "<option value=\"$line\">$line</option>"; } print "</select>"; } print qq~ </td> </tr> </table> ~; }
In reply to shortin this code up by andrew
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |