Advertisement

08.21.2008 at 07:57AM PDT, ID: 23667039
[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!

6.2

Function automation

Asked by syedasimmeesaq in PHP and Databases, PHP Scripting Language

hello there

I have a function that checks the database for A_1 to A_9 fields in database and if any of the fields have a zero or all zero then it transfers the user to somezero.php page. If there are no zero values then it tansfers the user to nonzero.php page.
What I would like to do is to put little bit more check and something like this
if A_1 to A_9 are all nonzero values then transfer to Bnonzero.
but if A_1 to A_9 have some zero or all zero values then transfer to Asomezero.php

if B_1 to B_9 are also nonzero then transfer to Cnonzero.php
but if B_1 to B_9 have some zero or all zero values then transfer to Bsomezero.php

If C_1 to C_9 are also nonzero then transfer to index.php
but if C_1 to C_9 have some zero or all zero values then transfer to Csomezero.php


Right now I have the function working for part A but I want to do it for rest without copying the code over and over again

Thanks
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:
function presentscriptA(){
 
if(isset($_SESSION['user'])){
 
require_once("connect_info.php"); 
 
$getvalues1 = mysql_query("select A_1, A_2, A_3, A_4, A_4, A_6,A_7, A_8, A_9 from survey where user = '".$_SESSION['user']."'");
$g1 = mysql_fetch_assoc($getvalues1);
foreach($g1 as $k=>$v){
  if( (int)$v !== 0 ){
      $$k = $v;
	  header("Location: nonzerovalues.php");
	  //exit; canot use exit as the value will be lost as soon as I use exit.
 }
 else{
  $$k ="Transfer";
  
 }
}
if($$k == "Transfer"){
header("Location: somezero.php");
exit;
}
}
else
{
//do this
}
} //close function presentscript
[+][-]08.21.2008 at 09:06AM PDT, ID: 22281037

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.

 
[+][-]08.21.2008 at 09:16AM PDT, ID: 22281136

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.

 
[+][-]08.21.2008 at 02:54PM PDT, ID: 22284681

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.

 
[+][-]08.21.2008 at 02:55PM PDT, ID: 22284689

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.

 
[+][-]08.22.2008 at 10:07AM PDT, ID: 22291984

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.

 
[+][-]08.22.2008 at 10:09AM PDT, ID: 22292007

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.

 
[+][-]08.23.2008 at 12:43PM PDT, ID: 22298214

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.

 
[+][-]08.23.2008 at 02:05PM PDT, ID: 22298449

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.

 
[+][-]08.23.2008 at 04:44PM PDT, ID: 22298945

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.

 
[+][-]08.23.2008 at 05:16PM PDT, ID: 22298996

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.

 
[+][-]08.23.2008 at 07:22PM PDT, ID: 22299266

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.

 
[+][-]08.23.2008 at 09:30PM PDT, ID: 22299534

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.

 
[+][-]08.24.2008 at 09:55AM PDT, ID: 22301281

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.

 
[+][-]08.24.2008 at 10:26AM PDT, ID: 22301371

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.

 
[+][-]08.24.2008 at 10:46AM PDT, ID: 22301446

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.

 
[+][-]08.24.2008 at 10:47AM PDT, ID: 22301450

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
Sign Up Now!
Solution Provided By: hielo
Participating Experts: 3
Solution Grade: A
 
 
[+][-]08.26.2008 at 02:39PM PDT, ID: 22319891

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.

 
[+][-]08.26.2008 at 09:25PM PDT, ID: 22321839

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...
20080716-EE-VQP-32 / EE_QW_2_20070628