Jump to content

2old2learn?

Members
  • Content Count

    288
  • Joined

  • Last visited

Community Reputation

0 Neutral

About 2old2learn?

  • Rank
    Member
  • Birthday 05/07/1950

Contact Methods

  • Website URL
    http://www.teamcombatleague.com
  • ICQ
    0

Profile Information

  • Location
    never_never_land
  • Interests
    Drinking/Wishing to Learn Php Coding/women....LOL any order is fine with me...
  1. Okay found the "{" error..so now I get this error...
  2. this is my selection option set up is this right also.. <td>Location:</td><td><select name="location" > <option value="Selection"> Make Selection </option> <option value="250y"> 250Yonge </option> <option value="20q"> 20 Queen </option> <option value="1dundas"> 1 Dundas </option> <option value="galleria_mall"> Galleria/Mall </option></td>
  3. Well, I've looked it over and over I guess I need fresh eyes..to find the "{" error... <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html><head><title>insert.php</title><link rel="stylesheet" type="text/css" href="/icc/skins/My_Start_Style.css" /><?phpinclude('config.php');foreach($_POST as $key => $value){ if(empty($_POST[$key])){ $formValid = false; };};?></head><body><?php$formValid = true;if($formValid){ //$con = mysql_connect("localhost","root",""); // if (!$con){ //die('Could not connect: ' . mysql_error()); // }; // mysql_select_db("tecicc", $con); //$select = $_POST['location']; $validTable=array('250y','20q','1dundas','galleria_mall'); if(in_array($select,$vaildTable)) //if ($_POST['location'] = "20q") { $sql="INSERT INTO $select ( srnumber, tenant, floor, location, job_description, employee, labour_cost, material_cost, date_twa_sent_to_tenant, date_twa_approved, date_parts_ordered, supplier, date_job_completed, date_billing_given_to_accounting, employee_comments, managers_comments) values ('$_POST[srnumber]','$_POST[tenant]','$_POST[floor]','$_POST[location]','$_POST[job_description]','$_POST[employee]','$_POST[labour_cost]','$_POST[material_cost]','$_POST[date_twa_sent_to_tenant]','$_POST[date_twa_approved]','$_POST[date_parts_ordered]','$_POST[supplier]','$_POST[date_job_completed]','$_POST[date_billing_given_to_accounting]','$_POST[employee_comments]','$_POST[managers_comments]')";} if (!mysql_query($sql,$con)){ die('Error: ' . mysql_error()); } echo "<script type='text/javascript'>alert('1 Record added');</script>"; if (isset($_POST['srnumber'])) { include('index_sr.php'); }mysql_close($con);{else}echo "<script type='text/javascript'>alert('Sorry, there was a problem with the form. Please check all data entries, try again');</script>"; if (isset($_POST['srnumber'])) { include('index_sr.php'); }}; ?> </body></html>
  4. Sorry even after being given the answers..I didn't do anything testing of it for a long time as a matter fact..was busy with other things...but today started working again on project..and ran into some little errors.. Below is my if/elseif statements and I get..error message... $select=$_POST['location']; if ( $select= '250y' ) { $sql="INSERT INTO 250y ( srnumber, tenant, floor, location, job_description, employee, labour_cost, material_cost, date_twa_sent_to_tenant, date_twa_approved, date_parts_ordered, supplier, date_job_completed, date_billing_given_to_accounting, employee_comments, managers_comments) values ('$_POST[srnumber]','$_POST[tenant]','$_POST[floor]','$_POST[location]','$_POST[job_description]','$_POST[employee]','$_POST[labour_cost]','$_POST[material_cost]','$_POST[date_twa_sent_to_tenant]','$_POST[date_twa_approved]','$_POST[date_parts_ordered]','$_POST[supplier]','$_POST[date_job_completed]','$_POST[date_billing_given_to_accounting]','$_POST[employee_comments]','$_POST[managers_comments]')";} elseif($select == '20q') { $sql="INSERT INTO 20q ( srnumber, tenant, floor, location, job_description, employee, labour_cost, material_cost, date_twa_sent_to_tenant, date_twa_approved, date_parts_ordered, supplier, date_job_completed, date_billing_given_to_accounting, employee_comments, managers_comments) values ('$_POST[srnumber]','$_POST[tenant]','$_POST[floor]','$_POST[location]','$_POST[job_description]','$_POST[employee]','$_POST[labour_cost]','$_POST[material_cost]','$_POST[date_twa_sent_to_tenant]','$_POST[date_twa_approved]','$_POST[date_parts_ordered]','$_POST[supplier]','$_POST[date_job_completed]','$_POST[date_billing_given_to_accounting]','$_POST[employee_comments]','$_POST[managers_comments]')";} elseif($select== '1dundas') { $sql="INSERT INTO 1dundas ( srnumber, tenant, floor, location, job_description, employee, labour_cost, material_cost, date_twa_sent_to_tenant, date_twa_approved, date_parts_ordered, supplier, date_job_completed, date_billing_given_to_accounting, employee_comments, managers_comments) values ('$_POST[srnumber]','$_POST[tenant]','$_POST[floor]','$_POST[location]','$_POST[job_description]','$_POST[employee]','$_POST[labour_cost]','$_POST[material_cost]','$_POST[date_twa_sent_to_tenant]','$_POST[date_twa_approved]','$_POST[date_parts_ordered]','$_POST[supplier]','$_POST[date_job_completed]','$_POST[date_billing_given_to_accounting]','$_POST[employee_comments]','$_POST[managers_comments]')";} else($select=='galleria_mall') { <<<<< Line 49 error message.. $sql="INSERT INTO galleria_mall ( srnumber, tenant, floor, location, job_description, employee, labour_cost, material_cost, date_twa_sent_to_tenant, date_twa_approved, date_parts_ordered, supplier, date_job_completed, date_billing_given_to_accounting, employee_comments, managers_comments) values ('$_POST[srnumber]','$_POST[tenant]','$_POST[floor]','$_POST[location]','$_POST[job_description]','$_POST[employee]','$_POST[labour_cost]','$_POST[material_cost]','$_POST[date_twa_sent_to_tenant]','$_POST[date_twa_approved]','$_POST[date_parts_ordered]','$_POST[supplier]','$_POST[date_job_completed]','$_POST[date_billing_given_to_accounting]','$_POST[employee_comments]','$_POST[managers_comments]')";} I hope I am getting this right...
  5. I saw his nice form format I like it and doing the same but the opposite way..I will be drawing from database as invoice..to tenant...
  6. never mind got what I want...
  7. Hey;I like the look of your form...I am interested in how you did it..I am looking to do something like it for my project at work..would like to see the script that makes it look the way it does..if you don't mind.. Thanks..
  8. Okay just reading over the posts..between you and SI0G, and I looked over this script you gave..if I run this it will encrypt my password to sha256???Many thanks....
  9. Solved...in phpmyadmin in the browse you can set it up either as "md5"or"sha1"...thanks all for your input..
  10. Thanks for info this project is just for office use...only wish to create a login script..no register, users will be manually entered....
  11. Cool its just a test database right now..so any error's is not a big deal...Thanks JSG
  12. Hey Okay I found how to do it the encryption thru phpMyAdmin..will make these changes once I get home from work..thanks all...as usual....
  13. Hey thanks..I am aware that php and javascript have a function to return..just wanted to make sure before I proceeded on...
  14. Hey thanks I thought there was something there but wasn't too sure..this also can be done creating a create " Table " , " User " , " password " file...
×
×
  • Create New...