Board index   FAQ   Search  
Register  Login
Board index PHP Your Scripts

Kind of lost

This is where you share YOUR scripts with others

Moderators: macek, egami, gesf

Kind of lost

Postby jbhuff2000 » Fri Aug 05, 2011 12:22 pm

OK, I am new to php and have little other experiences with scripting though I am trying to expand what I know. I have a web form designed for my wife and her friends and I am unable to get the outcome I ma looking for. The form is located at http://ntlnursing.jbrandonhuff.com/ntlnursing/CarePlan/

The form works but I need a way to dynamically add the rows one at a time or to format into an xls.

Any advice is appreciated.

Thank you and god bless.

J Brandon HUff
jbhuff2000
New php-forum User
New php-forum User
 
Posts: 3
Joined: Fri Aug 05, 2011 12:18 pm

Re: Kind of lost

Postby egami » Fri Aug 05, 2011 12:50 pm

Sorry, but I'm not going to go to your website.

If you post the code, I'll see what I can do.
User avatar
egami
php-forum GURU
php-forum GURU
 
Posts: 2197
Joined: Wed Oct 06, 2010 11:19 am
Location: Happy Valley, UT

Re: Kind of lost

Postby 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
&lt;pre&gt; &lt;/pre&gt; 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>&nbsp;</td>";

echo "<tr>";
echo "<td style='border:none;' colspan='4'>&nbsp;</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.
jbhuff2000
New php-forum User
New php-forum User
 
Posts: 3
Joined: Fri Aug 05, 2011 12:18 pm

Re: Kind of lost

Postby 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
&lt;pre&gt; &lt;/pre&gt; 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>&nbsp;</td>";

echo "<tr>";
echo "<td style='border:none;' colspan='4'>&nbsp;</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.
jbhuff2000
New php-forum User
New php-forum User
 
Posts: 3
Joined: Fri Aug 05, 2011 12:18 pm


Return to Your Scripts

Who is online

Users browsing this forum: No registered users and 2 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron