Jump to content

connexion2005

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

connexion2005's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. ok cool. how would you guys display this back to the customer. this is a party rental site so a teammate suggested that i possibly check dates that stuff was rented out and if it doesn't comply with my limits then it errors out (out of stock)...any other suggestions?
  2. Hey guys I just whipped up this script for part of our project. Do the insert statements and script look legit in order to make php insert data into my mysql tables which I already created in previous scripts? Josh <?php //The directions said to connect to the db using number one that Wylene created. define('SQL_HOST','localhost'); define('SQL_USER','Robert'); define('SQL_PASS','ITnw2459'); define('SQL_DB','test'); //Making sure we select the right database here. mysql_select_db(SQL_DB,$conn); //Here are the insert statements that I used to populate our tables. $incourseinfo = "INSERT INTO course_info (course_num, course_name, course_type, credit_hours) " . "VALUES (101, 'Geometry', 'Math', 1), " . "(102, 'Spanish', 'Langauages', 1), " . "(103, 'American History', 'History', 1), " . "(104, 'TechWriting', 'English', 1), " . "(105, 'Algebra1', 'Math', 1), " . "(106, 'Algebra2', 'Math', 1), " . "(107, 'ITsupport', 'Networking', 1), " . "(108, 'Webserver', 'Networking', 1), " . "(109, 'Bowling', 'Athletics', 1), " . "(110, 'Archery', 'Athletics', 1), " . "(111, 'World History', 'History', 1), " . "(112, 'Texas History', 'History', 1), " . "(113, 'Chemistry', 'Science', 1), " ; $results = mysql_query($incourseinfo) or die(mysql_error()); $instudentdata = "INSERT INTO student_data (stud_id, lname, fname, mname, campus enum) " . "VALUES (1001, 'Doe', 'John', 'Anderson', 'Bryan'), " . (1001, 'Dane', 'Jane', 'Bates', 'Bryan'), " . (1002, 'Davids', 'Joe', 'Davis', 'Bryan'), " . (1003, 'Berds', 'Jason', 'Jonathon', 'Bryan'), " . (1004, 'Crawford', 'Martha', 'Cindy', 'Bryan'), " . (1005, 'Fuqua', 'Amy', 'Jay', 'Bryan'), " . (1006, 'Pierce, 'Paul', 'Anthony', 'Bryan'), " . (1007, 'Cook', 'Dane', 'Damon', 'Bryan'), " . (1008, 'Bagwell', 'Jeff', 'Lucas', 'Bryan'), " . (1009, 'Wagner', 'Billy', 'Dean', 'Bryan'), " . (1010, 'Griffey', 'Ken', 'Jr', 'Bryan'), " . (1011, 'Jordan', 'Michael', 'James', 'Bryan'), " . (1012, 'Olajuwon', 'Hakeem', 'Dequa', 'Brenham'), " . (1013, 'Drexler', 'Clyde', 'Donvan', 'Brenham'), " . (1014, 'James', 'Lebron', 'Donovan', 'Brenham'), " . (1015, 'Groce', 'Jared', 'Roger', 'Brenham'), " . (1016, 'Groce', 'Chad', 'Allen', 'Brenham'), " . (1017, 'Faulk', 'Abby', 'Lynn', 'Brenham'), " . (1018, 'Thomas', 'Frank', 'Junior', 'Brenham'), " . (1019, 'Vaughn', 'Moe', 'Williams', 'Brenham'), " . (1020, 'Davis', 'Paul', 'Wayne', 'Brenham'), " . (1021, 'Jacobs', 'Anthony', 'John', 'Brenham'), " . (1022, 'Joseph', 'Paul', 'Raymond', 'Sealy'), " . (1023, 'Jameson', 'Joe', 'Jenna', 'Sealy'), " . (1024, 'Wilkerson', 'Katelynn', 'Lou', 'Sealy'), " . (1025, 'Hickson', 'Meredith', 'Shae', 'Sealy'), " . (1026, 'Homeyer', 'Catie', 'Lynn', 'Sealy'), " . (1027, 'Prewit', 'Brittany', 'Sarah', 'Sealy'), " . (1028, 'Legravier', 'Amber', 'Denise', 'Sealy'), " . (1029, 'Williams', 'Molly', 'Amber', 'Sealy'), " . (1030, 'Crnkovic', 'Nicole', 'Bae', 'Sealy'), " . (1031, 'Smith', 'Catherine', 'Vannah', 'Sealy'), " . (1032, 'Sowell', 'Savannah', 'Bobbi', 'Schulenburg'), " . (1034, 'Demson', 'Dannika', 'Didi', 'Schulenburg'), " . (1035, 'Werzer', 'Jennfier', 'Jade', 'Schulenburg'), " . (1036, 'Poehl', 'Jana', 'Grace', 'Schulenburg'), " . (1037, 'Groce', 'Josh', 'Holland', 'Schulenburg'), " . (1038, 'Alford', 'Steven', 'Bradley', 'Schulenburg'), " . (1039, 'Landolt', 'Keith', 'William', 'Schulenburg'), " . (1040, 'Hibbeler', 'James', 'Allen', 'Schulenburg'), " . (1041, 'Gold', 'Gatlin', 'Wayne', 'Schulenburg'), " . (1042, 'See', 'Stephen', 'Brooks', 'Schulenburg'), " ; $results = mysql_query($instudentdata) or die(mysql_error()); $ininstructors = "INSERT INTO instructors (inst_id, lname, fname, mname, office_loc, phone, email) " . "VALUES (2001, 'Thomas', 'Dale', 'NA', 'West', 9792558001, 'dale@edu'), " . (2002, 'Williams', 'Dale', 'John', 'West', 9792558002, 'dale2@edu'), " . (2003, 'Wexelman', 'Trent', 'Davis', 'West', 9792558003, 'trent@edu'), " . (2004, 'Jordan', 'Hawkin', 'Glenn', 'East', 9792558004, 'jordan@edu'), " ; $results = mysql_query($ininstructors) or die(mysql_error()); //Im not sure how to insert the semester tables? So I just did a random 10 to guess. The inst_id's repeat because there are only 4 instructors. Adan HELP!!!...LOL. $inenrollment - "INSERT INTO enrollment (course_num, inst_id, sud_id, semester enum, year) " . "VALUES (101, 2001, 1001, 'Fall', 2007), " . (102, 2002, 1002, 'Fall', 2007), " . (103, 2003, 1003, 'Fall', 2007), " . (104, 2004, 1004, 'Fall', 2007), " . (105, 2001, 1005, 'Fall', 2007), " . (106, 2002, 1006, 'Spring', 2008), " . (107, 2003, 1007, 'Spring', 2008), " . (108, 2004, 1008, 'Spring', 2008), " . (109, 2001, 1009, 'Spring', 2008), " . (110, 2002, 1010, 'Spring', 2008), " ; $results = mysql_query($inenrollment) or die(mysql_error()); echo "Data has been successfully inserted!" ?>
  3. Hey guys we are creating an online store for a project in on of my classes. I've searched around and cant really find how to create some availability scripts. How can I create a script to check our database on whether certain things are available? Any suggestions? Just asking for a good starting point. Thanks for any views or replies... Josh
  4. It wont matter about your domain and server name if you don't plan on going online with your files and just wanna run a stand alone. I have the http.conf file you need if you want it I can email it to you and let you know what you should change... Josh ps just pm me about this cause I will probably forget to check this thread.
  5. Here are my 3 problems...I could use all the help you can give me as my homework is due on Friday and I will be busy tomorrow... 1. Write a PHP script that takes a text string, bolds and/or underlines the text outputs the altered string to the monitor. Use the following text string: “Holy Batman!” Allow me to select the alteration of the string I desire. In effect, allow form, to include or exclude a variable/s in the running of the script. Name the batman_lastname.txt (i.e. batman_parker.txt). 2. Write a PHP script that creates a league array called NFL which contains two conference arrays named AFC and NFC, each of which contain four division named North, East, West and South. Each of these associative arrays will contain the following elements: Team Names and Cities. Create functions that will iterate elements of all the arrays and print out to an HTML table, the keys and their values the league, conferences, and divisions. Name the script: nfl_lastname.txt (i.e. nfl_parker.txt). 3. Insert an HTML form into the NFL script that allows me to select one of the Allow me to select the whole league, either conference or just one division.
×
×
  • 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.