Advertisement

12.06.2007 at 11:31AM PST, ID: 23006982
[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!

4.6

Requesting ID's from database and print results

Asked by catonthecouchproductions in PHP and Databases, PHP Scripting Language

Tags: ,

I have this page  - http://newspapersofamerica.com/new/?p=specialty - and I have been trying to work with this most of the morning and am stumped. I know how to do both of the methods separate but am confused how to put both together.

On that page you will select a state, then it will show all of the of the papers that belong to that state.
I want to add one more step. I have the a table called PAPER_CATEGORIES and I want to be able to select ALL papers from category X, then states, then all papers from that state and category.

http://newspapersofamerica.com/new/?p=specialty - go to the "Specialty" and on mouse over are the categories. So the link will be something like say:

index.php?p=specialty&cat=3 on that page will show the states then click that will show all states with papers belonging to CAT 3.



Would I use:

if($_REQUEST["id"]){

For the request part. My code is below for my specialty page.

This has been bugging me! Thanks so much. I will post any changes i have. I am going to try to figure it out.



Start 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:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
<?php
if(isset($_REQUEST["state"]) && $_REQUEST["state"]!=""){
        $id     = $_REQUEST['state'];
        $sql    = "SELECT * FROM papers WHERE state_id='$id' AND cat_id=2";
        $query  = mysql_query($sql) or die(mysql_error());
        $state  = $_GET["state_name"];
        
        $state_name_query = "SELECT state_name FROM states WHERE state_id=$id";
        $get_state_name = mysql_query($state_name_query) or die(mysql_error());
        list($state)    = mysql_fetch_row($get_state_name);
        print "
        <h2>$state</h2>
        <table id=\"myTable\" width=\"100%\" class=\"tablesorter\">
                <thead> 
                        <tr> 
                        <th>Paper Name</th> 
                        <th>City</th> 
                        <th>Circulation</th> 
                        <th>Price</th>
                        <th></th>
                        <th></th>
                        </tr> 
                </thead>
                <tbody>
              ";
        while($row = mysql_fetch_array($query)){
        print "<tr>";
                print "<td>".$row["name"]."</td>\n"; 
                print "<td>".$row["city"]."</td>\n"; 
                print "<td>".$row["circulation"]."</td>\n";
                print "<td>$".$row["price"]."</td>\n";
                print "<td class=\"desc\" align=\"center\">\n<span class=formInfo\">\n<a href=\"description.php?id=".$row["id"]."\" class=\"jTip\" id=\"desc_".$row["id"]."\" rel=\"description.php?id=".$row["id"]."&width=250&amp;name=Description%20as%20follow:\"><img src=\"images/newspaper.png\" alt=\"description\" /></a></span></td>\n";
                print "<td align=\"center\"><a href=\"#\"><img src=\"images/dollar.png\" alt=\"purchase\" /></a></td>\n";
        print "</tr>\n";
        }
        print "</tbody>\n";
        print "</table>\n";
 
}else 
{
?>
<h2>Specialty Papers</h2>
<h3>Pick a state below to view papers.</h3>
        <table id="state">
<?php
error_reporting(E_ALL);
$query = mysql_query("SELECT state_name,state_id FROM states");
$i=1;
while($row1 = mysql_fetch_array($query)){
    if($i%2){
        echo '<tr><td width="300" class="st"><a href="?p=speciality&state='.$row1["state_id"].'">'.$row1["state_name"].'</a></td>';
    }
    else{
        echo '<td width="300" class="st"><a href="?p=speciality&state='.$row1["state_id"].'">'.$row1["state_name"].'</a></td></tr>';
    }
    $i++;
}
if(mysql_num_rows($query)%2) {
    print "<td>&nbsp;</td></tr>";
}
?>
        </table>
<?php
        //echo "Error has occured"; <-- what is this for?
}
?>
[+][-]12.06.2007 at 12:11PM PST, ID: 20422786

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.

 
[+][-]12.06.2007 at 12:21PM PST, ID: 20422887

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.

 
[+][-]12.06.2007 at 12:38PM PST, ID: 20423058

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.

 
[+][-]12.06.2007 at 12:42PM PST, ID: 20423096

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.

 
[+][-]12.06.2007 at 12:47PM PST, ID: 20423141

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.

 
[+][-]12.06.2007 at 12:52PM PST, ID: 20423183

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.

 
[+][-]12.06.2007 at 01:01PM PST, ID: 20423243

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.

 
[+][-]12.06.2007 at 01:08PM PST, ID: 20423304

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.

 
[+][-]12.06.2007 at 01:11PM PST, ID: 20423329

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.

 
[+][-]12.06.2007 at 01:14PM PST, ID: 20423350

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.

 
[+][-]12.06.2007 at 01:15PM PST, ID: 20423357

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.

 
[+][-]12.06.2007 at 01:16PM PST, ID: 20423373

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.

 
[+][-]12.06.2007 at 01:18PM PST, ID: 20423379

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.

 
[+][-]12.06.2007 at 01:24PM PST, ID: 20423418

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.

 
[+][-]12.06.2007 at 01:25PM PST, ID: 20423430

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.

 
[+][-]12.06.2007 at 01:32PM PST, ID: 20423493

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.

 
[+][-]12.06.2007 at 01:37PM PST, ID: 20423541

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.

 
[+][-]12.06.2007 at 01:39PM PST, ID: 20423566

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.

 
[+][-]12.06.2007 at 01:42PM PST, ID: 20423590

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.

 
[+][-]12.06.2007 at 01:49PM PST, ID: 20423655

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.

 
[+][-]12.06.2007 at 02:38PM PST, ID: 20424072

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.

 
[+][-]12.06.2007 at 04:28PM PST, ID: 20424581

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.

 
[+][-]12.06.2007 at 04:41PM PST, ID: 20424639

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.

 
[+][-]12.06.2007 at 04:53PM PST, ID: 20424697

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.

 
[+][-]12.06.2007 at 04:59PM PST, ID: 20424723

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.

 
[+][-]12.06.2007 at 05:07PM PST, ID: 20424754

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.

 
[+][-]12.07.2007 at 12:26AM PST, ID: 20426100

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

Zones: PHP and Databases, PHP Scripting Language
Tags: print, results
Sign Up Now!
Solution Provided By: nacker2000
Participating Experts: 2
Solution Grade: A
 
 
[+][-]12.07.2007 at 05:05AM PST, ID: 20427055

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.

 
 
Loading Advertisement...
20081112-EE-VQP-42 / EE_QW_2_20070628