|
Posted by chimambo on 05/18/07 20:57
On 18 May, 20:16, Floortje <floor...@dont.mail> wrote:
> Floortje wrote:
>
> Im an idiot :-)
>
> > $sql="UPDATE $db SET enrolled='".$person['enrolled']."',
> > date='".$person['date']."' WHERE id = '$id'";
>
> --
> Arjenwww.arjenkarel.nl-- my crappy excuse for a website (just gathering dust)
Still not inserting the values. Maybe let me get an exact extract from
my code:
<?php require_once('./Connections/irdb.php'); ?>
<?php
$hos_no = $_GET["h_no"];
$currentPage = $_SERVER["PHP_SELF"];
$maxRows_zz = 10;
$pageNum_zz = 0;
if (isset($_GET['pageNum_zz']))
{
$pageNum_zz = $_GET['pageNum_zz'];
}
$startRow_zz = $pageNum_zz * $maxRows_zz;
mysql_select_db($database_irdb, $irdb);
$query_sl = "SELECT fname, sname FROM irdb_patients WHERE
irdb_patients.hospital_number ='$hos_no'";
$sl = mysql_query($query_sl, $irdb) or die(mysql_error());
$row_sl = mysql_fetch_assoc($sl);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<title>Medications</title>
</head>
<body>
<table align='left'>
<font face="Verdana" size="5"><b>Other Medications
</b></font>
</table>
<br>
<br>
<br>
<table border="0" width="100%" cellspacing="1">
<tr>
<td width="594"><b><font face="Verdana">Patient Name: <?php
echo $row_sl['fname'] ?> <?php echo
$row_sl['sname'] ?>
</font> </b> </td>
</tr>
</table>
<?php
$today = date('Y-m-d');
echo "Date: ";
echo date('d-m-Y', strtotime($today));
while (list($key, $val) = @each ($box))
{
echo "$val";
while (list($key, $v_val) = @each ($dose))
{
echo "$v_val";
}
}
$mysql_query="insert into x_tbl (a, b, c) "."values ('$v_val, $v_val,
$today) ";
mysql_query($mysql_query) or die ('Error Insertion into Other Co
Morbidities Failed');
}
echo "<form method=post action=''>";
echo "<table border='0' cellspacing='0' style='border-collapse:
collapse' width='100' >
<tr bgcolor='white'>
<td width='25%'><input type=checkbox name=box[] value='Adalimamub'></
td>
<td width='13%'> Adalimamub</td>
<td width='12%'><input type=text name=dose[] size=8></td>
<td width='25%'><input type=checkbox name=box[] value='Azathioprine'></
td>
<td width='13%'> Azathioprine</td>
<td width='12%'><input type=text name=dose[] size=8></td>
<td width='25%'><input type=checkbox name=box[]
value='Bendrofluazide'></td>
<td width='13%'> Bendrofluazide</td>
<td width='12%'><input type=text name=dose[] size=8></td>
<td width='25%'><input type=checkbox name=box[] value='Calcium'></td>
<td width='13%'> Calcium</td>
<td width='12%'><input type=text name=dose[] size=8></td>
</table>";
?><body bgcolor="white">
<b><font face="Verdana" size="2" color="#FF0000">**Please ensure
that the medications are correct before saving otherwise go back to
previous page.</font></b>
</body>
</html>
[Back to original message]
|