Can you help me reformat this php code?

CyberGeek

New member
Im having a brain freeze today I give up doing it alone can someone please help me?

<?php




$name = sqlite_escape_string($_REQUEST['name']);
$email = sqlite_escape_string($_REQUEST['email']);
$phone = sqlite_escape_string($_REQUEST['phone']);

if ($firstname != "") {
sqlite_query($db,"INSERT INTO contacts (name,email) VALUES('$name','$email')");
}
$id = intval($_REQUEST['id']);
}
$i = 0;
while ($row = sqlite_fetch_array($result)) {
if ($i > 0) {
echo "<tr valign='bottom'>";
echo "<td bgcolor='#ffffff' height='1' style='background-image:url(img/strichel.gif)' colspan='6'></td>";
echo "</tr>";
}
echo "<tr valign='middle'>";
echo "<td class='tabval'><img src='img/blank.gif' alt='' width='10' height='20'></td>";
echo "<td class='tabval'><b>".htmlspecialchars($row['lastname'])."</b>*</td>";
echo "<td class='tabval'>".htmlspecialchars($row['firstname'])."*</td>";
echo "<td class='tabval'>".htmlspecialchars($row['phone'])."*</td>";

sqlite_close($db);
?>
<html>
<head></head
<body>
<form action="<?php echo basename($_SERVER['PHP_SELF']); ?>" method="get">
table border="0" cellpadding="0" cellspacing="0">
<tr><td><input type="text" size="20" name="name"></td></tr>
<tr><<td> <input type="text" size="20" name="email"></td></tr>
<tr><td><input type="submit" value="<?php echo $TEXT['phonebook-button2']; ?>"></td></tr>
</table>
</form>
</body
</html
 
Back
Top