[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.4

PHP/MYSQL: Insert values into databases - cannot seem to understand what the correct names to be

Asked by niccross in Miscellaneous Web Development

Tags: mysql, values

I need to add this array information into a database, but I cannot pinpoint what the names would be in code. Can anyone help?? This is the main portion of the code that is going to throw me off:

  {
      $printOut = "<table height=-200 border=1>";
      while($row = mysql_fetch_array($result3)) {
         $theLabel = strtr($row["prod_analyte"], " ","");
         if (!empty($theLabel)) {
           $printOut.="<tr><td><b><font face='Arial' size='2' color='black'>".$row["prod_analyte"]."</b></font></td>
                      <td><input type=\"text\" value=\"0\" name=\"".$rows["prod_analyte"]."\"></td></tr>";
     }


All Code:

<?php
echo "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?".">";
//get db config info
require $_SERVER['DOCUMENT_ROOT'].".\config\db_config.php";
//Makes connection to db or displays custom error page.
$connection = mysql_connect($db_host, $db_user, $db_password)
or die(mysql_error());

//pick db to use
$result=mysql_select_db($db_name, $connection)
or die("Database connection failed!");

//set table to use
$tablename1="utak_product_main";
$tablename3="utak_product_analyte";
?>
<html>
<head>
<title>UTAK P2P - Add Analysis: Part Two</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<?
  $select1 = $_POST['prod_id'];
  $select2 = $_POST['prod_lot_no'];

$query = "SELECT prod_analyte FROM $tablename3 WHERE prod_id='$select1'";
$result3 = mysql_query($query) or die(mysql_error());
?>

<form action="utak_p2p_add_new_c.php" method="POST">
<br>
      <font face="Arial" size="2" color="black"><b>Test Name:</b></font> <input type="text" name="txt_name" size="50"><p>

<?  // This is the data array for the product and product lot from part one of adding a new test
   echo('
       <b><font face="Arial" size="2" color="black">Product Number:</b></font> &nbsp'.$select1.'
       <br>
       <b><font face="Arial" size="2" color="black">Product Lot Number:</b></font> &nbsp'.$select2.'
       <p>
       ');

  {
      $printOut = "<table height=-200 border=1>";
      while($row = mysql_fetch_array($result3)) {
         $theLabel = strtr($row["prod_analyte"], " ","");
         if (!empty($theLabel)) {
           $printOut.="<tr><td><b><font face='Arial' size='2' color='black'>".$row["prod_analyte"]."</b></font></td>
                      <td><input type=\"text\" value=\"0\" name=\"".$rows["prod_analyte"]."\"></td></tr>";
     }
   }

 if (!stristr($printOut,"<tr>")) {
      $printOut.="<tr><td><b><font face='Arial' size='2' color='black'>Results:</b></font></td>
                                   <td><input type=\"text\" value=\"0\" name=\"txt_result\"></td></tr>";
 }
    $printOut.="</table>";
    echo($printOut);
        }
?>

        <p><b><font face="Arial" size="2" color="black">Test Comments:</b></font><br>
        <textarea style="width: 100%" rows="10" name="txt_analysis"></textarea>
        <input type="submit" value="Submit Data">
        &nbsp;
        <input type="reset" value="Reset Data">
        &nbsp
        <input type="button" value="GoBack" onclick="history.go(-1)">
</form>
[+][-]08/03/04 07:37 AM, ID: 11705004Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zone: Miscellaneous Web Development
Tags: mysql, values
Sign Up Now!
Solution Provided By: neester
Participating Experts: 2
Solution Grade: A
 
[+][-]08/03/04 07:42 AM, ID: 11705072Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08/03/04 08:36 PM, ID: 11712175Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08/04/04 04:56 AM, ID: 11714341Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/04/04 06:15 AM, ID: 11715076Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08/05/04 06:47 AM, ID: 11726038Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091021-EE-VQP-81