[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.

07/04/2009 at 11:05AM PDT, ID: 24544074
[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.2

After setting up session_start() on each page, how do I check to make sure my forms are passing session variables

Asked by digigirl1124 in PHP for Windows, PHP and Databases

Tags: PHP, MySQL, Windows Server, session variables

After setting up session_start() on each page, how do I check to make sure my forms are passing session variables and can I pass those variables to PHP's mail()?

1) How do I get the autoincremented id from the dealers table and compare it to the $_SESSION variable to make sure they are equal?
2) How do I call the $_SESSION variable from page to page, if it is auto set with session_start()?
3) Once it is passed to the page, can I pass it to the mail() function, or do I just pass the variable that I called (see#2)
4) Then, once the registration page is closed, they check their email and return to LogIn and send a warranty request (through another form), how do I call the original $_SESSION variable, so that the information submitted in this form is "connected" to the same user in the database?
-- after login, they are routed to a loginOptions.php page which gives them three options from which to choose --- warranties, non-warranty part ordering, technical documents page --
How do I make sure the user and the order are connected??  
?
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:
//AFTER COLLECTING THE NAME AND PASSWORD FROM THE FORM, we INSERT INTO THE DATABASE named processreg1.php
 
$addNewDealer = @mysql_query("INSERT INTO dealer_user (dealer_id, d_email, d_pass, signup_date) VALUES (NULL, '".$_POST['d_email']."', '".$_POST['d_pass']."', now())")
        or die (mysql_error());
		//$add_member = mysql_query($insert);
        if (!addNewDealer) 
        {
        echo 'There has been an database error. Please contact the webmaster.' . mysql_error();
        }
        else
        { 
         ///THIS SETS THE SESSION TRACKER CODE********************************************************
        //SET SESSION VARIABLES TO PASS BETWEEN PAGES
            $dealer_id = mysql_insert_id(); //this would be the dealer_id autoincremented for this dealer row
            $_SESSION['trackerID'] = $dealer_id;
        }
session_write_close();
        echo header("Location: dealerReg2.php" );
}
 
//THE USER IS DIRECTED TO THE NEXT FORM, TO ENTER ALL OF THE CONTACT INFORMATION AND THE SESSION TRACKERID IS SUPPOSE TO GO WITH IT------------
 
<?php
session_start();
require "db.php";
 
//USE THE SESSION GLOBAL FUNCTION TO CALL THE SESSION FROM THE PREVIOUS PAGE
 
$trackerID = $_SESSION['trackerID'];
 
//The information is retrieved on this dealerReg2.php form and inserted into the database
if(isset($_POST['submit']))
{
//all the checks and balances for the form - validation - go here
/*INSERT INTO DATABASE ****************ALSO INSERT TRACKER_ID SESSION VARIABLE**************************/
$query = ("INSERT INTO dealerstable (dealer_name, dealer_address, dealer_address2, dealer_city, dealer_state, dealer_country, dealer_zipcode,  dealer_Acode, dealer_phone, dealer_AcodeCell, dealer_cell, dealer_AcodeFax, dealer_fax, dealer_contact, dealer_salesContact, dealer_serviceContact, dealer_partsContact, db_password, trackerID)
VALUES ('".$_POST['dealer_name']."', '".$_POST['dealer_address']."', '".$_POST['dealer_address2']."', '".$_POST['dealer_city']."', '".$_POST['dealer_state']."', '".$_POST['dealer_country']."','".$_POST['dealer_zipcode']."', '".$_POST['dealer_Acode']."', '".$_POST['dealer_phone']."', '".$_POST['dealer_AcodeCell']."', '".$_POST['dealer_cell']."', '".$_POST['dealer_AcodeFax']."', '".$_POST['dealer_fax']."', '".$_POST['dealer_contact']."', '".$_POST['dealer_salesContact']."', '".$_POST['dealer_serviceContact']."', '".$_POST['dealer_partsContact']."', '".$_POST['db_password']."', '".$_SESSION['trackerID']."')"); 
 
if(!$query) 
		{
	    echo "There has been an error creating your account. 
            Please contact the webmaster." . mysql_error();
		}
..................................
/* 
1) How do I get the autoincremented id from the dealers table and compare it to the $_SESSION variable to make sure they are equal? 
2) How do I pass the $_SESSION variable from page to page, or call it on each page, if it is auto set with session_start()? 
3) Once it is passed to the page, can I pass it to the mail() function?
 
Keywords: After setting up session_start() on …
 
Loading Advertisement...
 
[+][-]07/04/09 01:01 PM, ID: 24777848

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.

 
[+][-]07/04/09 01:55 PM, ID: 24777992

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.

 
[+][-]07/04/09 04:44 PM, ID: 24778394

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.

 
[+][-]07/05/09 06:12 AM, ID: 24779919

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

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

 
[+][-]07/05/09 06:32 AM, ID: 24779988

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

Zones: PHP for Windows, PHP and Databases
Tags: PHP, MySQL, Windows Server, session variables
Sign Up Now!
Solution Provided By: bportlock
Participating Experts: 2
Solution Grade: A
 
 
[+][-]07/05/09 06:51 AM, ID: 24780013

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.

 
[+][-]07/05/09 09:47 AM, ID: 24780491

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.

 
[+][-]07/05/09 09:48 AM, ID: 24780497

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.

 
[+][-]07/05/09 09:51 AM, ID: 24780510

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

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

 
[+][-]07/06/09 03:58 AM, ID: 24783969

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.

 
[+][-]07/06/09 04:21 AM, ID: 24784080

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.

 
[+][-]07/06/09 05:54 AM, ID: 24784662

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.

 
[+][-]07/06/09 12:32 PM, ID: 24788458

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.

 
[+][-]07/06/09 04:53 PM, ID: 24790337

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.

 
[+][-]07/06/09 07:45 PM, ID: 24791088

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.

 
[+][-]07/06/09 07:48 PM, ID: 24791103

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.

 
[+][-]07/08/09 02:52 AM, ID: 24802031

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.

 
[+][-]07/08/09 08:42 AM, ID: 24804977

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.

 
 
Loading Advertisement...
20091028-EE-VQP-85 - Hierarchy / EE_QW_3_20090701_SELECT_ZONES