Jump to content

simeonC

Members
  • Posts

    48
  • Joined

  • Last visited

Everything posted by simeonC

  1. Thank you I love this forum I used the dot equals before but I kept re-initializing the variable. as suchVVVVVVV while ($customer = mysql_fetch_array($completed_orders)){ $requested_customers = '<tr>'; $requested_customers .='<td>'.$customer['customer_name'].'</td>'; $requested_customers .='<td>'.$customer['year'].'</td>'; $requested_customers .='<td>'.$customer['make'].'</td>'; $requested_customers .='<td>'.$customer['model'].'</td>'; $requested_customers .='<td>'.$customer['date'].'<td>'; $requested_customers .='</tr>'; //Do something with $requested_customers } VVVCorrect way for anyone with similiar problem novice mistake use dot equal from beginningVVV while ($customer = mysql_fetch_array($completed_orders)){ $requested_customers .= '<tr>'; $requested_customers .='<td>'.$customer['customer_name'].'</td>'; $requested_customers .='<td>'.$customer['year'].'</td>'; $requested_customers .='<td>'.$customer['make'].'</td>'; $requested_customers .='<td>'.$customer['model'].'</td>'; $requested_customers .='<td>'.$customer['date'].'<td>'; $requested_customers .='</tr>'; //Do something with $requested_customers }
  2. Dude I hate to be a bother I have tried the variabe still gives me 1 output. may i post entire code here for you to take a look. please i do need help..
  3. Still having issues with my while{} loop and do{} while() loop I want it to run an output of different row for each result set sent back from the mysql database. However it is remaining stagnent with same result even though mysql_num_rows function shows two result sets set back. Now I am lost here is the code again please help me. <?php session_start();?> <?php $con=mysql_connect('localhost','root','root'); $db_select=mysql_select_db('total',$con); $completed_orders=mysql_query("SELECT * FROM repair_orders JOIN (serviced_vechicles,Customers) ON repair_orders.car_id=serviced_vechicles.car_id AND Customers.customer_id=serviced_vechicles.customer_id WHERE repair_status='0' ORDER BY customer_name DESC"); $existingCustomers=mysql_num_rows($completed_orders); if ($existingCustomers<1){ $message= 'You do not have any complete vehicles in your shop';}else{ $fetch_complete=mysql_fetch_array($completed_orders); do{ $requested_customers = '<tr> <td>'.$customer['customer_name'].'</td> <td>'.$customer['year'].'</td> <td>'.$customer['make'].'</td> <td>'.$customer['model'].'</td> <td>'.$customer['date'].'<td> </tr>'; //Do something with $requested_customers }while ($customer = mysql_fetch_array($completed_orders)); } ?>
  4. Well I would suggest contactng your hosting company to make sure that you are connecting to the server correctly they will certainly help you get connected. I don't think having them in two seperate locations is a problem
  5. line 16 Sorry I didn't look at line 16 with a little more vigilance you did not use mysql_query function here Your code was something like this mysql_query=("INSERT INTO Driver_applicants.... but it should be $mysql_query=mysql_query("INSERT INTO Driver_applicants....) like I have here also remove all double quotes within the Value brace just leave single quotes around the values $mysql_query=mysql_query("INSERT INTO Driver_applicants (FirstName, LastName, Applicationdate, Phone, AltPhone, DL, StreetAddress, City, State, Zip) VALUES ('$_POST[APPLICANT_TO_COMPLETE_FirstName]','$_POST[APPLICANT_TO_COMPLETE_LastName]','$_POST[DateofApplication]', '$_POST[APPLICANT_TO_COMPLETE_PhoneNumber]','$_POST[APPLICANT_TO_COMPLETE_SecondaryPhone]', '$_POST[License1]','$_POST[APPLICANT_TO_COMPLETE_CurrentAddress]', '$_POST[APPLICANT_TO_COMPLETE_CurrentCity]', '$_POST[APPLICANT_TO_COMPLETE_CurrentState]', '$_POST[APPLICANT_TO_COMPLETE_CurrentZip]')"); ^^^^^^^fix for 16 ^^^^^^^ VVVVVV you did not use the mysql_query function VVVVV V this varible NEEDS VV FUNCTION HERE $mysql_query=MYSQL_QUERY("INSERT INTO Driver_applicants (FirstName, LastName, Applicationdate, Phone, AltPhone, DL, StreetAddress, City, State, Zip) VALUES ('$_POST[APPLICANT_TO_COMPLETE_FirstName]','$_POST[APPLICANT_TO_COMPLETE_LastName]','$_POST[DateofApplication]', '$_POST[APPLICANT_TO_COMPLETE_PhoneNumber]','$_POST[APPLICANT_TO_COMPLETE_SecondaryPhone]', '$_POST[License1]','$_POST[APPLICANT_TO_COMPLETE_CurrentAddress]', '$_POST[APPLICANT_TO_COMPLETE_CurrentCity]', '$_POST[APPLICANT_TO_COMPLETE_CurrentState]', '$_POST[APPLICANT_TO_COMPLETE_CurrentZip]')"); <td colspan="2">"(')Employment Application Details:"</td>///line 38 you must remove single quote <td colspan="2">"Employment Application Details:"</td> do not see anything wrong with 25
  6. He has one part ^^^^^^ but I do not see the error on line 25 only one is mysql connect because you removed the connection.... $server="xx.xx.xxx.xx:3307"; ////line 7 was missing double quote at the end <td colspan="2">"Employment Application Details:"</td> ///you had a single quote here on line 38 $mysql_query=("INSERT INTO Driver_applicants (FirstName, LastName, Applicationdate, Phone, AltPhone, DL, StreetAddress, City, State, Zip) VALUES ('$_POST[APPLICANT_TO_COMPLETE_FirstName]','$_POST[APPLICANT_TO_COMPLETE_LastName]','$_POST[DateofApplication]','$_POST[APPLICANT_TO_COMPLETE_PhoneNumber]','$_POST[APPLICANT_TO_COMPLETE_SecondaryPhone]','$_POST[License1]','$_POST[APPLICANT_TO_COMPLETE_CurrentAddress]','$_POST[APPLICANT_TO_COMPLETE_CurrentCity]','$_POST[APPLICANT_TO_COMPLETE_CurrentState]','$_POST[APPLICANT_TO_COMPLETE_CurrentZip]')");// you missed the double quotes and closing brace here on you query $link=mysql_connect($server, $username, $password);////you placed the identity marker (=) between mysql_connect and the ($server, $username, $password) when it is not need cause error Hope that helps
  7. its inside the loop body.. Now i recieve output but the two rows that are generated are exactly the same.. but when queried in phpmyadmin I get two different rows
  8. <?php //send data to sql database first $username="xxxxxx"; $password="xxxxxxxxxxx"; $database="xxxxxxx"; $server="xx.xx.xxx.xx:3307"; $link=mysql_connect($server, $username, $password); if (!$link) { die('Could not connect: ' . mysql_error()); } @mysql_select_db($database, $con); $mysql_query=("INSERT INTO Driver_applicants (FirstName, LastName, Applicationdate, Phone, AltPhone, DL, StreetAddress, City, State, Zip) VALUES ('$_POST[APPLICANT_TO_COMPLETE_FirstName]','$_POST[APPLICANT_TO_COMPLETE_LastName]','$_POST[DateofApplication]','$_POST[APPLICANT_TO_COMPLETE_PhoneNumber]','$_POST[APPLICANT_TO_COMPLETE_SecondaryPhone]','$_POST[License1]','$_POST[APPLICANT_TO_COMPLETE_CurrentAddress]','$_POST[APPLICANT_TO_COMPLETE_CurrentCity]','$_POST[APPLICANT_TO_COMPLETE_CurrentState]','$_POST[APPLICANT_TO_COMPLETE_CurrentZip]')"); if (!mysql_query($mysql_query,$link)) { die('Error: ' . mysql_error()); } //now send email to applications@aandstransportation.com $to = 'applications@aandstransportation.com'; $from = $_POST['ApplicantName']; // $status = $_POST['Project_status']; /* subject */ $subject = "Application For Employment Web Submission"; /* message */ $message = '<html> <head> <title>Application For Employment Web Submission</title> </head> <body> <p>Dear '.$to.',</p> <table> <tr> <td colspan="2">"Employment Application Details"</td> </tr><tr> <td>Applicant Name: </td><td>' .$_POST['ApplicantName']. '</td> </tr> <tr> <td>Date of Application: </td><td>'.$_POST['DateofApplication'].'</td> </tr><tr> <td>Company: </td><td>'.$_POST['Company'].'</td> </tr><tr> <td>Address: </td><td>'.$_POST['Address'].'</td> </tr><tr> <td>Signature: </td><td>'.$_POST['Signature1'].'</td> </tr><tr> <td>Date: </td><td>'.$_POST['Date'].'</td> </tr> <tr> <td></h3><strong> FOR COMPANY USE</strong> </h3></td> </tr> <td> </td> <tr> <td>APPLICANT HIRED: </td><td>'.$_POST['APPLICANTHIRED'].'</td> </tr> <tr> <td>District: </td><td>'.$_POST['District'].'</td> </tr> <tr> <td>DATE EMPLOYED: </td><td>'.$_POST['DATEEMPLOYED'].'</td> </tr> <tr> <td>Interviewing Manager: </td><td>'.$_POST['InterviewingManager'].'</td> </tr> <tr> <td>Signature: </td><td>'.$_POST['InterviewingManager_Signature'].'</td> </tr> <tr> <td>Human Resources: </td><td>'.$_POST['HumanResources'].'</td> </tr> <tr> <td>Signature: </td><td>'.$_POST['HumanResources_Signature'].'</td> </tr> <td> </td> <tr> </h3> <strong> <td>APPLICANT TO COMPLETE</h3></strong></td> </tr> <tr> <td>LastName: </td><td>'.$_POST['APPLICANT_TO_COMPLETE_LastName'].'</td> </tr><tr> <td>FirstName: </td><td>'.$_POST['APPLICANT_TO_COMPLETE_FirstName'].'</td> </tr><tr> <td>SSN: </td><td>'.$_POST['APPLICANT_TO_COMPLETE_SSN'].'</td> </tr><tr> <td>Phone Number: </td><td>'.$_POST['APPLICANT_TO_COMPLETE_PhoneNumber'].'</td> </tr><tr> <td>Secondary Phone: </td><td>'.$_POST['APPLICANT_TO_COMPLETE_SecondaryPhone'].'</td> </tr><tr> <td>Position(s) applied for: </td><td>'.$_POST['APPLICANT_TO_COMPLETE_Position_applied__for'].'</td> </tr><tr> <td>Rate of pay expected: </td><td>'.$_POST['APPLICANT_TO_COMPLETE_Rate_of_pay_expected'].'</td> </tr> <td> </td> <tr> <td></h3> <strong>Current<br /> Addresses</strong></h3></td> </tr> <tr> <td>Address: </td><td>'.$_POST['APPLICANT_TO_COMPLETE_CurrentAddress'].'</td> </tr><tr> <td>City: </td><td>'.$_POST['APPLICANT_TO_COMPLETE_CurrentCity'].'</td> </tr><tr> <td>State: </td><td>'.$_POST['APPLICANT_TO_COMPLETE_CurrentState'].'</td> </tr><tr> <td>Zip: </td><td>'.$_POST['APPLICANT_TO_COMPLETE_CurrentZip'].'</td> </tr><tr> <td>How Long?: </td><td>'.$_POST['APPLICANT_TO_COMPLETE_CurrentHowLong'].'</td> </tr> <td> </td> <tr> <td></h3> <strong>Previous Addresses</strong></h3></td> </tr> <tr> <td>Address: </td><td>'.$_POST['APPLICANT_TO_COMPLETE_PreviousAddress1'].'</td> </tr><tr> <td>City: </td><td>'.$_POST['APPLICANT_TO_COMPLETE_PreviousCity1'].'</td> </tr><tr> <td>State: </td><td>'.$_POST['APPLICANT_TO_COMPLETE_PreviousState1'].'</td> </tr><tr> <td>Zip: </td><td>'.$_POST['APPLICANT_TO_COMPLETE_PreviousZip1'].'</td> </tr><tr> <td>How Long?: </td><td>'.$_POST['APPLICANT_TO_COMPLETE_PreviousHowLong1'].'</td> </tr> <td> </td> <tr> <td>Address: </td><td>'.$_POST['APPLICANT_TO_COMPLETE_PreviousAddress2'].'</td> </tr><tr> <td>City: </td><td>'.$_POST['APPLICANT_TO_COMPLETE_PreviousCity2'].'</td> </tr><tr> <td>State: </td><td>'.$_POST['APPLICANT_TO_COMPLETE_PreviousState2'].'</td> </tr><tr> <td>Zip: </td><td>'.$_POST['APPLICANT_TO_COMPLETE_PreviousZip2'].'</td> </tr><tr> <td>How Long?: </td><td>'.$_POST['APPLICANT_TO_COMPLETE_PreviousHowLong2'].'</td> </tr> <td> </td> <tr> <td>Address: </td><td>'.$_POST['APPLICANT_TO_COMPLETE_PreviousAddress3'].'</td> </tr><tr> <td>City: </td><td>'.$_POST['APPLICANT_TO_COMPLETE_PreviousCity3'].'</td> </tr><tr> <td>State: </td><td>'.$_POST['APPLICANT_TO_COMPLETE_PreviousState3'].'</td> </tr><tr> <td>Zip: </td><td>'.$_POST['APPLICANT_TO_COMPLETE_PreviousZip3'].'</td> </tr><tr> <td>How Long?: </td><td>'.$_POST['APPLICANT_TO_COMPLETE_PreviousHowLong3'].'</td> </tr> <td> </td> <tr> <td>Do you have the legal right to work in the United States? : </td><td>'.$_POST['Do_you_have_the_legal_right_to_work_in_the_United_States'].'</td> </tr><tr> <td>Date of Birth: </td><td>'.$_POST['APPLICANT_TO_COMPLETE_PreviousDate_of_Birth'].'</td> </tr><tr> <td>Can you provide proof of age?: </td><td>'.$_POST['Can_you_provide_proof_of_age'].'</td> </tr><tr> <td>Have you worked for this company before?: </td><td>'.$_POST['Have_you_worked_for_this_company_before'].'</td> </tr><tr> <td>Where?: </td><td>'.$_POST['APPLICANT_TO_COMPLETE_PreviousWhere'].'</td> </tr> <tr> <td>Are you currently employed?: </td><td>'.$_POST['Are_you_currently_employed'].'</td> </tr><tr> <td>How were you referred to the company?: </td><td>'.$_POST['How_were_you_referred_to_the_company'].'</td> </tr><tr> <td>If yes, explain if you wish: </td><td>'.$_POST['If_yes_explain_if_you_wish'].'</td> </tr> <td> </td> <tr> <td><h3><strong>EMPLOYMENT HISTORY</strong></h3></td> </tr> <tr> <td>Employer: </td><td>'.$_POST['EMPLOYMENT_HISTORY_Employer'].'</td> </tr><tr> <td>Employed from: </td><td>'.$_POST['EMPLOYMENT_HISTORY_Employedfrom'].'</td> </tr><tr> <td>To: </td><td>'.$_POST['EMPLOYMENT_HISTORY_To'].'</td> </tr><tr> <td>Address: </td><td>'.$_POST['EMPLOYMENT_HISTORY_Address'].'</td> </tr><tr> <td>City: </td><td>'.$_POST['EMPLOYMENT_HISTORY_City'].'</td> </tr><tr> <td>State: </td><td>'.$_POST['EMPLOYMENT_HISTORY_State'].'</td> </tr><tr> <td>Zip: </td><td>'.$_POST['EMPLOYMENT_HISTORY_Zip'].'</td> </tr><tr> <td>Contact Person: </td><td>'.$_POST['EMPLOYMENT_HISTORY_ContactPerson'].'</td> </tr><tr> <td>Phone Number: </td><td>'.$_POST['EMPLOYMENT_HISTORY_PhoneNumber'].'</td> </tr><tr> <td>Position Held: </td><td>'.$_POST['EMPLOYMENT_HISTORY_PositionHeld'].'</td> </tr><tr> <td>Salary/Wage: </td><td>'.$_POST['EMPLOYMENT_HISTORY_SalaryWage'].'</td> </tr><tr> <td>Reason For Leaving: </td><td>'.$_POST['EMPLOYMENT_HISTORY_ReasonForLeaving'].'</td> </tr><tr> <td>Were you subject to FMCSRs* (DOT regulations) while employed: </td><td>'.$_POST['Were_you_subject_to_FMCSRs_DOT_regulations_while_employed'].'</td> </tr><tr> <td>Were you subject to DOT drug & alcohol testing?: </td><td>'.$_POST['Were_you_subject_to_DOT_drug_alcohol_testing'].'</td> </tr> <td> </td> <tr> <td>Employer: </td><td>'.$_POST['EMPLOYMENT_HISTORY_Employer1'].'</td> </tr><tr> <td>Employed from: </td><td>'.$_POST['EMPLOYMENT_HISTORY_Employedfrom1'].'</td> </tr><tr> <td>To: </td><td>'.$_POST['EMPLOYMENT_HISTORY_To1'].'</td> </tr><tr> <td>Address: </td><td>'.$_POST['EMPLOYMENT_HISTORY_Address1'].'</td> </tr><tr> <td>City: </td><td>'.$_POST['EMPLOYMENT_HISTORY_City1'].'</td> </tr><tr> <td>State: </td><td>'.$_POST['EMPLOYMENT_HISTORY_State1'].'</td> </tr><tr> <td>Zip: </td><td>'.$_POST['EMPLOYMENT_HISTORY_Zip1'].'</td> </tr><tr> <td>Contact Person: </td><td>'.$_POST['EMPLOYMENT_HISTORY_ContactPerson1'].'</td> </tr><tr> <td>Phone Number: </td><td>'.$_POST['EMPLOYMENT_HISTORY_PhoneNumber1'].'</td> </tr><tr> <td>Position Held: </td><td>'.$_POST['EMPLOYMENT_HISTORY_PositionHeld1'].'</td> </tr><tr> <td>Salary/Wage: </td><td>'.$_POST['EMPLOYMENT_HISTORY_SalaryWage1'].'</td> </tr><tr> <td>Reason For Leaving: </td><td>'.$_POST['EMPLOYMENT_HISTORY_ReasonForLeaving1'].'</td> </tr><tr> <td>Were you subject to FMCSRs* (DOT regulations) while employed: </td><td>'.$_POST['Were_you_subject_to_FMCSRs_DOT_regulations_while_employed1'].'</td> </tr><tr> <td>Were you subject to DOT drug & alcohol testing?: </td><td>'.$_POST['Were_you_subject_to_DOT_drug_alcohol_testing1'].'</td> </tr> <td> </td> <tr> <td>Employer: </td><td>'.$_POST['EMPLOYMENT_HISTORY_Employer2'].'</td> </tr><tr> <td>Employed from: </td><td>'.$_POST['EMPLOYMENT_HISTORY_Employedfrom2'].'</td> </tr><tr> <td>To: </td><td>'.$_POST['EMPLOYMENT_HISTORY_To2'].'</td> </tr><tr> <td>Address: </td><td>'.$_POST['EMPLOYMENT_HISTORY_Address2'].'</td> </tr><tr> <td>City: </td><td>'.$_POST['EMPLOYMENT_HISTORY_City2'].'</td> </tr><tr> <td>State: </td><td>'.$_POST['EMPLOYMENT_HISTORY_State2'].'</td> </tr><tr> <td>Zip: </td><td>'.$_POST['EMPLOYMENT_HISTORY_Zip2'].'</td> </tr><tr> <td>Contact Person: </td><td>'.$_POST['EMPLOYMENT_HISTORY_ContactPerson2'].'</td> </tr><tr> <td>Phone Number: </td><td>'.$_POST['EMPLOYMENT_HISTORY_PhoneNumber2'].'</td> </tr><tr> <td>Position Held: </td><td>'.$_POST['EMPLOYMENT_HISTORY_PositionHeld2'].'</td> </tr><tr> <td>Salary/Wage: </td><td>'.$_POST['EMPLOYMENT_HISTORY_SalaryWage2'].'</td> </tr><tr> <td>Reason For Leaving: </td><td>'.$_POST['EMPLOYMENT_HISTORY_ReasonForLeaving2'].'</td> </tr><tr> <td>Were you subject to FMCSRs* (DOT regulations) while employed: </td><td>'.$_POST['Were_you_subject_to_FMCSRs_DOT_regulations_while_employed2'].'</td> </tr><tr> <td>Were you subject to DOT drug & alcohol testing?: </td><td>'.$_POST['Were_you_subject_to_DOT_drug_alcohol_testing2'].'</td> </tr> <td> </td> <tr> <td>Employer: </td><td>'.$_POST['EMPLOYMENT_HISTORY_Employer3'].'</td> </tr><tr> <td>Employed from: </td><td>'.$_POST['EMPLOYMENT_HISTORY_Employedfrom3'].'</td> </tr><tr> <td>To: </td><td>'.$_POST['EMPLOYMENT_HISTORY_To3'].'</td> </tr><tr> <td>Address: </td><td>'.$_POST['EMPLOYMENT_HISTORY_Address3'].'</td> </tr><tr> <td>City: </td><td>'.$_POST['EMPLOYMENT_HISTORY_City3'].'</td> </tr><tr> <td>State: </td><td>'.$_POST['EMPLOYMENT_HISTORY_State3'].'</td> </tr><tr> <td>Zip: </td><td>'.$_POST['EMPLOYMENT_HISTORY_Zip3'].'</td> </tr><tr> <td>Contact Person: </td><td>'.$_POST['EMPLOYMENT_HISTORY_ContactPerson3'].'</td> </tr><tr> <td>Phone Number: </td><td>'.$_POST['EMPLOYMENT_HISTORY_PhoneNumber3'].'</td> </tr><tr> <td>Position Held: </td><td>'.$_POST['EMPLOYMENT_HISTORY_PositionHeld3'].'</td> </tr><tr> <td>Salary/Wage: </td><td>'.$_POST['EMPLOYMENT_HISTORY_SalaryWage3'].'</td> </tr><tr> <td>Reason For Leaving: </td><td>'.$_POST['EMPLOYMENT_HISTORY_ReasonForLeaving3'].'</td> </tr><tr> <td>Were you subject to FMCSRs* (DOT regulations) while employed: </td><td>'.$_POST['Were_you_subject_to_FMCSRs_DOT_regulations_while_employed3'].'</td> </tr><tr> <td>Were you subject to DOT drug & alcohol testing?: </td><td>'.$_POST['Were_you_subject_to_DOT_drug_alcohol_testing3'].'</td> </tr> <td> </td> <tr> <td>Employer: </td><td>'.$_POST['EMPLOYMENT_HISTORY_Employer4'].'</td> </tr><tr> <td>Employed from: </td><td>'.$_POST['EMPLOYMENT_HISTORY_Employedfrom4'].'</td> </tr><tr> <td>To: </td><td>'.$_POST['EMPLOYMENT_HISTORY_To4'].'</td> </tr><tr> <td>Address: </td><td>'.$_POST['EMPLOYMENT_HISTORY_Address4'].'</td> </tr><tr> <td>City: </td><td>'.$_POST['EMPLOYMENT_HISTORY_City4'].'</td> </tr><tr> <td>State: </td><td>'.$_POST['EMPLOYMENT_HISTORY_State4'].'</td> </tr><tr> <td>Zip: </td><td>'.$_POST['EMPLOYMENT_HISTORY_Zip4'].'</td> </tr><tr> <td>Contact Person: </td><td>'.$_POST['EMPLOYMENT_HISTORY_ContactPerson4'].'</td> </tr><tr> <td>Phone Number: </td><td>'.$_POST['EMPLOYMENT_HISTORY_PhoneNumber4'].'</td> </tr><tr> <td>Position Held: </td><td>'.$_POST['EMPLOYMENT_HISTORY_PositionHeld4'].'</td> </tr><tr> <td>Salary/Wage: </td><td>'.$_POST['EMPLOYMENT_HISTORY_SalaryWage4'].'</td> </tr><tr> <td>Reason For Leaving: </td><td>'.$_POST['EMPLOYMENT_HISTORY_ReasonForLeaving4'].'</td> </tr><tr> <td>Were you subject to FMCSRs* (DOT regulations) while employed: </td><td>'.$_POST['Were_you_subject_to_FMCSRs_DOT_regulations_while_employed4'].'</td> </tr><tr> <td>Were you subject to DOT drug & alcohol testing?: </td><td>'.$_POST['Were_you_subject_to_DOT_drug_alcohol_testing'].'</td> </tr> <td> </td> <td><h3><strong>ACCIDENT RECORD</strong> for past 3 years or more (attach sheet if more space is required). If non, write none.</h3></td> <td> </td> <tr> <td>Last Accident: </td><td>'.$_POST['Last_Accident1'].'</td> </tr><tr> <td>Next Previous: </td><td>'.$_POST['Next_Previous11'].'</td> </tr><tr> <td>Next Previous: </td><td>'.$_POST['Next_Previous12'].'</td> </tr> <td> </td> <td><h3><strong>TRAFFIC CONVICTIONS</strong> and forfeitures for the past 3 years (other than parking violations). If none, write none.</h3></td> <tr> <td>Last Violation: </td><td>'.$_POST['Last_Accident2'].'</td> </tr><tr> <td>Next Previous: </td><td>'.$_POST['Next_Previous21'].'</td> </tr><tr> <td>Next Previous: </td><td>'.$_POST['Next_Previous22'].'</td> </tr><tr> <td>Next Previous: </td><td>'.$_POST['Next_Previous23'].'</td> </tr> <tr> <td>Have you EVER been convicted of a DUI, DWI and/or DUBAL?: </td><td>'.$_POST['Have_you_EVER_been_convicted_of_a_DUI_DWI_and_or_DUBAL'].'</td> </tr><tr> <td>Have you EVER been convicted for reckless driving?: </td><td>'.$_POST['Have_you_EVER_been_convicted_for_reckless_driving'].'</td> </tr><tr> <td>Have you EVER been convicted of fleeing or attempting to elude a police officer?: </td><td>'.$_POST['Have_you_EVER_been_convicted_of_fleeing_or_attempting_to_elude_a_police_officer'].'</td> </tr><tr> <td>Have you EVER been convicted of leaving the scene of an accident?: </td><td>'.$_POST['Have_you_EVER_been_convicted_of_leaving_the_scene_of_an_accident'].'</td> </tr> <tr> <td>Have you EVER been convicted of a railroad crossing violation?: </td><td>'.$_POST['Have_you_EVER_been_convicted_of_a_railroad_crossing_violation'].'</td> </tr><tr> <td>Have you EVER been convicted of passing a school bus while it is unloading or loading?: </td><td>'.$_POST['Have_you_EVER_been_convicted_of_passing_a_school_bus_while_it_is_unloading_or_loading'].'</td> </tr><tr> <td>Has your license EVER been suspended or revoked?: </td><td>'.$_POST['Has_your_license_EVER_been_suspended_or_revoked'].'</td> </tr><tr> <td>If so, please explain:: </td><td>'.$_POST['If_yes_explain_if_you_wish1'].'</td> </tr><tr> <td>Have you ever been convicted of a felony?: </td><td>'.$_POST['Have_you_ever_been_convicted_of_a_felony'].'</td> </tr><tr> <td>If so, please explain: </td><td>'.$_POST['If_yes_explain_if_you_wish2'].'</td> </tr> <td> </td> <td> <h3> <strong>EXPERIENCE AND QUALIFICATIONS - DRIVER</strong></h3></td> <td> </td> <tr> <td>State: </td><td>'.$_POST['Listalldriverlicenses_State1'].'</td> </tr><tr> <td>Licence: </td><td>'.$_POST['License1'].'</td> </tr><tr> <td>Class/Endorsements: </td><td>'.$_POST['Class_Endorsements1'].'</td> </tr><tr> <td>Expiration: </td><td>'.$_POST['Expiration1'].'</td> </tr> <tr> <td>State: </td><td>'.$_POST['Listalldriverlicenses_State2'].'</td> </tr><tr> <td>Licence: </td><td>'.$_POST['License2'].'</td> </tr><tr> <td>Class/Endorsements: </td><td>'.$_POST['Class_Endorsements2'].'</td> </tr><tr> <td>Expiration: </td><td>'.$_POST['Expiration2'].'</td> </tr> <tr> <td>State: </td><td>'.$_POST['Listalldriverlicenses_State3'].'</td> </tr><tr> <td>Licence: </td><td>'.$_POST['License3'].'</td> </tr><tr> <td>Class/Endorsements: </td><td>'.$_POST['Class_Endorsements3'].'</td> </tr><tr> <td>Expiration: </td><td>'.$_POST['Expiration3'].'</td> </tr> <tr> <td>A. Have you ever been denied a licens, permit or privilege to operate a motor vehicle?: </td><td>'.$_POST['Have_you_ever_been_denied_a_license'].'</td> </tr> <tr> <td>Please list any other driving experience (equipment type & approximate dates/miles driven): </td><td>'.$_POST['If_yes_explain_if_you_wish3'].'</td> </tr> <tr> <td><strong>Education </strong>listing highest grade completed and any degrees earned </td><td>'.$_POST['listing_highest_grade_completed_and_any_degrees_earned'].'</td> </tr> <td> </td> <tr> <td>Signature: </td><td>'.$_POST['Signature'].'</td> </tr> <tr> <td>Date: </td><td>'.$_POST['Date1'].'</td> </tr> <td> </td> </tr> </table> </body> </html>'; /* To send HTML mail, you can set the Content-type header. */ $headers = "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; $headers .= "From: " . $from . "\r\n"; /* and now mail it */ /*echo $message; die;*/ @mail($to, $subject, $message, $headers); echo "<h4>Your message has been sent to us with your full application details.<br /> <span>We will reply soon as soon as possible to follow up with you on our hiring process. Thank you for considering A&S Transportation, Inc. for employment.</span></h4>"; $mysql_close($link); ?> I was able to remove all errors that showed on dreamweaver see if that works. Just copy and paste
  9. Along your whole code none of your php is wrapped with php tags "<?php ?>"
  10. I ended up linking each cell seperately that such a bother hopefully we can get that updated.. however I tried the while loop and the do while loop I am still getting 1 row output.. I used the mysql_num_rows function and it counts two rows for the result set. So now what do I do. Should I be using the mysqli extension. I am really lost
  11. Your not going to get any help posting the whole code here.. did you try error reporting.. place this at the top of you code it should tell you which lines where you are having the error and sometimes why all errors really ignore the ones which says the variable is not set if you know they are not set at the moment <?php error_reporting(E_ALL); ini_set('display_errors', '1'); ?>
  12. Im trying to loop a variable to extract each customer out the database however it just repeats the same customer any help would be greatly appreciated. $completed_orders=mysql_query("SELECT * FROM repair_orders JOIN (serviced_vechicles,Customers) ON repair_orders.car_id=serviced_vechicles.car_id AND Customers.customer_id=serviced_vechicles.customer_id WHERE repair_status='0' ORDER BY customer_name DESC"); $existingCustomers=mysql_num_rows($completed_orders); echo $existingCustomers; $fetch_complete=mysql_fetch_array($completed_orders); $customer=$fetch_complete; $requested_customers = '<a href="">'; '<tr> <td>'.$customer['customer_name'].'</td> <td>'.$customer['year'].'</td> <td>'.$customer['make'].'</td>< td>'.$customer['model'].'</td> <td>'.$customer['date'].'<td> </tr>'; '</a>'; How do I loop through ^^^^^ $requested_customers
  13. I have a form with many if statements and else statements. It works fine. However when I press the refresh button the form is submitted once again every time i hit the refresh button. how do i stop this from happening
  14. Got it thank you for your help.
  15. Ok let me see if I can make this a little clearer I have a form which when submitted is uploaded into my DB I have a loop script in my existingcustomers.php file which displays all data within the table where the information has been upload when I input information in the form and it is uploaded into the database the page reloads--RIGHT the loop is performed but does not return the data that was just uploaded---- it is when you refresh the page once more that the information that was submitted through the form is displayed on the page.. Sorry if I cannot make this any clearer
  16. anything that the user didn't input just doesn't upload to the database I require year, make, and model before i insert into the database. The problem is once data has been uploaded it does not dynamically display on page. That is why I need to reload page. However I try to be as vigilant as possible since im a newbie and I cannot see where in the line I am getting error for. Is there anyway for me to reload the page without using the header function
  17. I have a form which when submitted should display the updates on the page however it doesn't. The data uploads into the database gracefully however it does not show on the page until it is refreshed. I would like to know how to refresh the page after form has been submitted. I tried header but I get an error. Warning: Cannot modify header information - headers already sent by (output started at /Applications/MAMP/htdocs/total/new_car.php:22) in /Applications/MAMP/htdocs/total/new_car.php on line 34 and I have the header set above any html output so that lost me. I added relavant files here existingcustomers.php new_car.php
  18. Thank you hopefully one day i become as wise as you master
  19. Software: MySQL Software version: 5.5.29 - Source distribution my table is constructed as such CREATE TABLE `parts` ( `name` char(100) NOT NULL, `price` float(6,2) NOT NULL, `qty` int(11) NOT NULL, `total_price` float(6,2) NOT NULL, `profit` float(6,2) NOT NULL, `car_id` int(11) NOT NULL, `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, KEY `car_id` (`car_id`), ) ENGINE=InnoDB DEFAULT CHARSET=latin1; Well I really have no idea what I am doing. I am not fimiliar with the time_functions in mysql. Basically what I would like to achieve is a result set which extract weekly profits as days goes by and resets the following week. I attempted the following code: SELECT profit FROM parts WHERE date=curdate()-INTERVAL 7 days this returns nothing. I would like for only the items inserted for this current week be fetched to display profits Thank you hopefully this was clear
  20. Funny I tried the mysql_error() function and I never got anything back had no idea it had to be echoed. You are the best its working like a well oiled engine.Thank you. praises. what can I do to show you my appreciation.
  21. Decided to leave the $color_query out because it is structured the same reduce redundancy. but my errors are coming from the $length_query... I just do not kow what I am doing wrong. will change to while also
  22. Well mysql query will not execute there is nothing wrong with the syntax to my knowledge and its becoming a bother. Even had a seizure. So I have to turn to you guys... The bottom code is a function for a shopping cart. I am trying to connect to the database to extract all relevant lengths and colors for a particular product. Instead of returning a result set I get a boolean which must be 0. My question is what am I doing wrong and how can I fix it. This been going on forever. function index_display($index_array){ foreach ($index_array as $row){ $length=mysql_query("SELECT * FROM many_lengthHair WHERE product_id='$row[product_id]'"); $length_array=mysql_fetch_array($length); echo '<tr>'; echo '<th>'; echo ' <img name="product" src="uploads/'.$row['product_id'].'.jpg" width="120" height="110" alt="$row[product_id]">'; echo '<th>'; echo '<th width="143" valign="top" scope="col">'; echo $row['cat_name'] . '<br>' . $row['texture_name'] . '<br>'; /////Retreive Lengths for product_id echo '<label>'; echo 'Lengths ·'; echo '<select name="length">'; do { echo '<option value="'; echo $length_array['length_name']. '">'; echo $length_array['length_name']; echo '</option>'; } while ($length_array=mysql_fetch_array($length)); echo '</select><br>'; /////Retreive Color for product_id echo '<label>'; echo 'Color ·'; echo '<select name="length">'; do { echo '<option value="'; echo $color_fetch['length_name']. '">'; echo $color_fetch['length_name']; echo '</option>'; } while ($color_fetch=mysql_fetch_array($color_query)); echo '</select>'; echo '<br>'; echo '</th>'; echo '</tr>'; } //end of foreach loop } ?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.