Advertisement

02.28.2008 at 01:41PM PST, ID: 23202057
[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!

9.4

query results into variables then into default form field values??

Asked by headbump in PHP Scripting Language

Tags:

Hi all,

I'm trying to pull results of a sql query into variables so that I can display them as default form field values on an edit page...

I can see that I'm getting the results I want, but I don't know how to get them into separate variables for each field and then set the default value of my form fields to those variables...the end result will be an update page...

Please see my code snippet/lame attempt...the first table printed is just so I can see that my results are coming through...

thanks,

AWStart Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
<?php
                  $linkID = @mysql_connect("localhost", "xx", "xx");
                        mysql_select_db("xx", $linkID);
                        
                        $resultID = mysql_query("SELECT strTitle, txtAnnouncement, dtmDate, strPostedBy FROM tblAnnounce WHERE intRecordID = '$intRecordID'", $linkID);
 
                
                        print "<table border=\"1\" width=\"800\"><tr><th colspan=5>Edit Announcement</th></tr>";
                        print "<tr><td>Announcement No.</td><td>Title</td><td>Announcement</td><td>Date</td><td>Posted By</td></tr>";
                        
                        while ($row = mysql_fetch_row($resultID))
                
                                {
                                        print "<tr>";
                                        foreach ($row as $field)
                                        {
                                                print"<td>$field</td>";
                                        }
                                        print "</tr>";
                                }
                                print "</table>";
                        
                        if ($resultID == TRUE)
                        {
                                print "<table width=\"800\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
                                print "<tr><td width=\"800\" valign=\"top\">";
                                print "<form name=\"frmEditNews\" method=\"post\" action=\"processnews.php\">";
                                print "<b>Title: </b><input type=\"text\" name=\"strTitle\" size=\"15\" maxlength=\"150\" value=$title></p>";
                                print "<input type=\"hidden\" name=\"intRecordID\" value=\"'$intRecordID'\"></p>";
                                print "<input type=\"text\" name=\"dtmDate\" size=\"15\" maxlength=\"30\"> (yyyy/mm/dd)</p>";
                                print "<input type=\"text\" name=\"strPostedBy\" size=\"15\" maxlength=\"100\"></p>";
                                print "<textarea name=\"txtAnnouncement\" cols=\"50\" rows=\"6\"></textarea></p>";
                                print "<p><input type=\"reset\" name=\"reset\" value=\"Reset\"><input type=\"submit\" name=\"Submit\" value=\"Send Updates\">";
                                print "</p></form></td>";
                                print "<td bgcolor=\"#D1E0f0\" width=\"10\"><img src=\"images/transgif.gif\" width=\"10\" height=\"300\"></td>";
                                print "</tr></table>";
                        }
                        else
                        {
                                print "There has been an unexpected error. Please try again.";
                        }
                        print "<br>";
        
        mysql_close($linkID);
        
        ?>
[+][-]02.28.2008 at 02:00PM PST, ID: 21008644

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.28.2008 at 09:47PM PST, ID: 21011190

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.29.2008 at 04:57AM PST, ID: 21012738

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 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.29.2008 at 11:22AM PST, ID: 21016605

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.01.2008 at 02:48AM PST, ID: 21021049

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.01.2008 at 09:25AM PST, ID: 21022532

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 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.05.2008 at 08:50PM PST, ID: 21057434

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.05.2008 at 10:25PM PST, ID: 21057842

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.06.2008 at 06:29AM PST, ID: 21060419

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 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.06.2008 at 09:00AM PST, ID: 21062302

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.06.2008 at 09:54AM PST, ID: 21062925

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.06.2008 at 10:40AM PST, ID: 21063303

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 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.06.2008 at 10:43AM PST, ID: 21063334

View this solution now by starting your 7-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: PHP Scripting Language
Tags: php
Sign Up Now!
Solution Provided By: julianmatz
Participating Experts: 6
Solution Grade: A
 
 
[+][-]03.06.2008 at 10:45AM PST, ID: 21063358

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628