by jbhuff2000 » Sat Aug 06, 2011 2:45 am
I am sorry just thought it be easier but your help and offer are greatly appreciated.
<!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=utf-8" />
<title>Care Plan Generator</title>
<style>
body{
background-color:#663366;
color:white;
}
table{
border: 1pt solid black;
background-color: #c0c0c0;
}
td{
border: 1pt solid black;
background-color:#cc99cc;
}
textarea{
color:white;
background-color:#663366;
}
input{
background-color:#663366;
color:white;
}
</style>
</head>
<body>
<?php
$numEnt = $_GET['numEnt'];
$x = 1;
$field1 = 1001;
$field2 = 10001;
$field3 = 100001;
$field4 = 1000001;
$general = null;
$goal = null;
$count = 0;
echo "<form method='POST' action='test.php'>";
echo "<table border='0' align='center'>";
echo "<tr>";
echo "<td colspan='4' align='center'>
<h1>Care Plan Generator</h1>
</td>";
echo "<tr>";
echo "<td colspan='4' align='center'>
<b><pre>
Directions: Complete all spaces without removing the tags. For formatting to be correct
<pre> </pre> can not be removed. If they are removed formatting will be incorrect,
it will appear as a run on sentance.
</pre></b>
</td>";
echo "<tr>";
echo "<td colspan='4' style='text-align:center; font-size: 16pt; font-weight:bold;'>Patient Information</td>";
echo "<tr>";
echo "<td>Student Name:<input type='text' name='StudName'></td>";
echo "<td>Date: <input type='text' name='Date'></td>";
echo "<td>Patient Initials:<input type='text' name='PatInt'></td>";
echo "<td>Diagnosis:<input type='text' name='Diagnosis'>";
echo "<tr>";
echo "<td>Age<input type='text' name='Age'>";
echo "<td>Room Num<input type='text' name='Room'>";
echo "<td>Allergies<input type='text' name='Allergies'>";
echo "<td> </td>";
echo "<tr>";
echo "<td style='border:none;' colspan='4'> </td>";
echo "<tr>";
echo "<td>Nursing Diagnosis</td>";
echo "<td colspan='3'><textarea name='general'><pre>
</pre></textarea></td>";
echo "<tr>";
echo "<td>Subjective/Objective Data (AEB)</td>";
echo "<td colspan='3'><textarea name='goal'><pre>
</pre></textarea></td>";
while ($x <= $numEnt){
$count++;
$x++;
echo "<tr>";
echo "<td style='text-align:center; color:black;'>$count Nursing Intervention</td>";
echo "<td style='text-align:center;'>$count Rationale(s)</td>";
echo "<td style='text-align:center;'>$count Goals</td>";
echo "<td style='text-align:center;'>$count Outcome(s) Evaluations</td>";
echo "<tr>";
echo "<td><textarea name='$field1'><pre>
$count.
</pre></textarea></td>";
echo "<td><textarea name='$field2'><pre>
$count.
</pre>
</textarea></td>";
echo "<td><textarea name='$field3'><pre>
$count.
</pre></textarea></td>";
echo "<td><textarea name='$field4'><pre>
$count.
</pre>
</textarea></td>";
echo "</tr>";
$field1++;
$field2++;
$field3++;
$field4++;
}
echo "<tr>";
echo "<td><input type='submit' value='Create Care Plan'></td>";
echo "<td align='center'></td>";
echo "<td><input type='text' name='numEnt' value='$numEnt' style='visibility:hidden'></td>";
echo "<td align='right'><input type='reset' value='Clear Clear Plan'></td>";
echo "</table>";
echo "</form>";
?>
</body>
</html>
I would like to be able to add a button that when clicked it would add a row to my table with 4 textareas in each row.