Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> PHP
Author Message
Donovan
Client



Joined: Oct 07, 2003
Posts: 735
Location: Ohio

PostPosted: Sun Feb 20, 2005 5:41 pm Reply with quote

The first part of my code pull the name from the table and populates the correct field "Service Record of $info[name]"


Code:
OpenTable();

   $id = $_GET['id'];
    $result = $db->sql_query("SELECT * FROM milpacs_members mm WHERE mm.uniqueid ='$id'");
    $info = $db->sql_fetchrow($result);
   if (!$result) {
    echo("<p>Error performing query: " . mysql_error() . "</p>");
    exit();
   }
   echo "<form>";
   echo "<p><a href=\"admin.php?op=milpacs\">Return to Main Administration</a></p>";
    echo "<table border=\"2\" cellpadding=\"2\" align =\"center\" cellspacing=\"0\" style=\"border-collapse: collapse\" bgcolor=\"#000000\" bordercolor=\"#111111\" width=\"100%\"><tr>"
  . "         <td align=\"center\" bgcolor=\"#777777\">"
  . "            <b><font color=\"#000000\">Service Record of $info[name]</font></b>"


So I know I am hitting the table.

The second part pulling records to fill some rows is partialy working. The date is pulled and displayed but not the details.

Quote:
echo "<table border=0 width='100%' cellpadding='3'><tr><th width='10%'>Record Date</th><th width='20%'><b>Record Details</b></th></tr>";

$sql = "SELECT sr.record_dt, sr.details FROM service_record sr WHERE sr.uniqueid = '$id'";
$result1 = $db->sql_query($sql);
while ( $row = $db->sql_fetchrow($result1) ) {
$date = $row["record_dt"];
$details = $row["details"];

echo " <tr>";
echo " <td width=\"10%\">";
echo " <input type=\"text\" name=\"record_dt\" value=\"$date\">";
echo " </td>";
echo " <td align=\"left\" bgcolor=\"#999999\">";
echo " <textarea name=\"details\" cols=\"70\" colspan=\"1\" rows=\"3\" value=\"$details\"></textarea>";
echo " </td>";
echo " </tr>";
}
echo "</table>";


I have this same thing happening in two different scripts.
 
View user's profile Send private message Visit poster's website ICQ Number
Donovan







PostPosted: Sun Feb 20, 2005 6:08 pm Reply with quote

Well I changed the textarea to text boxes and it pulls up just fine.

How do you get multiple rows in a text box so the page doesn't get stretched. I guess I need a wrap value set on or off as well.
 
Mighty_Y
New Member
New Member



Joined: Sep 21, 2003
Posts: 3

PostPosted: Wed Mar 02, 2005 9:34 am Reply with quote

sorry for the late reply Smile
but change this
Code:
echo " <textarea name=\"details\" cols=\"70\" colspan=\"1\" rows=\"3\" value=\"$details\"></textarea>";

to
Code:
echo " <textarea name=\"details\" cols=\"70\" colspan=\"1\" rows=\"3\">$details</textarea>";
 
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> PHP

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©