Jump to content

jdubwelch

Members
  • Posts

    85
  • Joined

  • Last visited

    Never

Everything posted by jdubwelch

  1. <script type="text/javascript"> <!-- function addLink (field) { var sampleLink = "Some sample link."; document.form1.field.value = sampleLink; } //--> </script> <form id="form1" name="form1" method="post" action=""> <p><textarea name="textBox1" cols="45" rows="6"></textarea></p> <p><input name="link1" type="button" id="link1" value="add link" onclick="addLink('textBox1')" /></p> <p><textarea name="textBox2" cols="45" rows="6"></textarea></p> <p><input name="link2" type="button" id="link2" value="add link" onclick="addLink('textBox2')" /></p> </form> All i want is: when you click link1 the sample link goes into textbox1, when you click link2 the sample link goes into textBox2. What am I doing wrong here?
  2. I want one function to be able to change the values into 2 different textareas, by sending the textarea names to the function. but it's not working. function addLink (field) { var url; url = prompt("Enter URL below: ", "http://"); linkTitle = prompt("Enter the link title"); document.form1.field.value = "[url=" + url + "]" + linkTitle + "[/url]"; } <form id="form1" name="form1" method="post" action=""> <p><textarea name="textBox1" cols="45" rows="6"></textarea></p> <p><input name="link" type="button" id="link" value="add link" onclick="addLink('textBox1')" /></p> <p><textarea name="textBox2" cols="45" rows="6"></textarea></p> <p><input name="link" type="button" id="link" value="add link" onclick="addLink('textBox2')" /></p> </form> it doesn't write the values into the boxes, unless i had two different functions that had: document.textBox1.field.value what am i doing wrong? i've looked in my book, and all on the web.
  3. how do i recreate this: the html: <div id="videoInsert"><img src="images/anna-marla1.jpg" width="100" height="50" />WATCH: <a href="video.php">Marla compete in 2000 Sydney Olympics</a> </div> css so far: #videoInsert { margin-left: 25px; margin-right: 27px; font-family: Georgia, "Times New Roman", Times, serif; font-size: 12px; font-weight: bold; background-color: #EBEBEB; border-left-width: 5px; border-left-style: solid; border-left-color: #666666; }
  4. I have a table full of players with their number of points. I want to rank them, but if they're are more than one I want to count those, and set a ranking to them. For example: let's say player A has 10pts, B 8pts, C 8pts, D 6pts, E 6pts, F 6pts, and G 2pts. I want them to be ranked: #1 - A [ 10 pts] #2 - B [ 8 pts] - C [ 8 pts] #3 - D [ 6 pts] - E [ 6 pts] - F [ 6 pts] #4 - G [ 2 pts] how do i do that? here's the code that just makes an ordered list of the players and points: $query = "SELECT users . first_name , users . last_name , tourney_stats . totpts FROM `tourney_stats` , `users` WHERE users . user_id =tourney_stats . user_id ORDER BY `tourney_stats` . `totpts` DESC LIMIT 9"; $db_query = mysql_query ($query) or die (mysql_error()); echo "<ol>\n"; while ($row = mysql_fetch_array ($db_query)) { $first = $first = $row['first_name']; $first = substr($first, 0, 2); $pts = $row[totpts]; echo "<li>$first. $row[last_name] [ $pts ]</li>\n"; } echo "</ol>\n";
  5. here's the css i have so far: body { padding: 0px; margin-top: 10px; margin-left: 10px; } #container { font-family: Courier, monospace; width: 800px; } #container #header { height: 47px; background-image: url(../images/headerbg.gif); } #container #left { float: left; width: 213px; background-image: url(../images/leftbg.gif); background-repeat: repeat-y; } #container #left h1 { margin: 0; padding: 0; } #container #left ul { margin: 0px; padding: 0px; } #container #left li { list-style-type: none; } #container #right { float: right; width: 145px; background-image: url(../images/rightbg.gif); background-repeat: repeat-y; padding-left: 11px; padding-top: 5px; } #container #right h1 { font-size: 12px; margin: 0; padding: 0; } #container #right p { font-size: 10px; padding: 0; margin-top: 5px; margin-bottom: 10px; font-family: Arial, Helvetica, sans-serif; } #container #content { margin-left: 213px; margin-right: 156px; padding-right: 10px; padding-left: 10px; background-color: #FFF18F; } #container #content h1 { text-transform: capitalize; margin: 0; padding: 0; font-size: 18px; } #container #content p { font-size: 12px; line-height: 150%; }
  6. how do you make a three column layout with each column the same height. But the height is dependent on the content in the "content" div? here's my html : <body> <div id="container"> <div id="header"></div> <div id="left"> <h1>Hoop Fix 2007</h1> <ul> <li>register</li> <li>rules</li> <li>players</li> <li>standings </li> </ul> </div> <div id="right"> <h1>nifty 9 </h1> <ol> <li>J. Welch [22]</li> <li>R. Welch [21]</li> <li>J. Carmichael [21]</li> <li>etc </li> </ol> <h1>Winning Percentage</h1> <p>Joe Smith leads the winning percentage category with 85.5%. For a complete list, <a href="#">click here</a>. </p> <h1>Score Board</h1> <p>#1 UCLA 86<br /> #16 WINTHROP 54</p> <p>#9 OREGON 81<br /> #8 KENTUCKY 78</p> <h1>UPSETS</h1> <p>#12 DREXEL 65<br /> #5 BYU 61</p> <p>#14 LONG BEACH 66<br /> #3 WASHINGTON STATE 60 </p> </div> <div id="content"> <!-- start of content --> <h1>Welcome to Hoop Fix 2007 </h1> <p>Welcome to Hoop Fix 2007, yet another year of big games, huge upset and last minute heroics. Join the fun and register today. You’ll be able to make your picks on Selection Sunday, March 11. </p> <p>Quick Rundown: <br /> TODAY: Register Now <br /> BEFORE MARCH 11: Pay your entry fee ($5)<br /> MARCH 11: Sign in to make your picks</p> <p><br /> </p> <!-- end of content --> </div> </div> </body>
  7. i have an array: [code]Array $streak: (     [0] => W     [1] => W     [2] => L     [3] => W     [4] => L     [5] => L     [6] => W     [7] => L )[/code] I need to find the winning or losing streak from this and other arrays like it. $streak[0] is the last game that was played.  This would be a 2 Game Winning Streak.  I just can't put my brain around how i'd go through and figure it out.  this is what i've tried, but it's just returning the number of ones that match up. [code] // GET THEIR STREAK $streak = get_streak ($gid, $row[user_id]); // this returns the array you see above $streaklength = 1; $n = count($streak); for ($i = 1; $i < $n; $i++) { if ($streak[0] == $streak[$i]) { $streaklength++; } else {  // i want to exit the for loop and stop but i don't know how } }[/code] ideas?
  8. I'm getting this error: [quote]#1064 - You have an error in your SQL syntax near ''G8' = 'Middle Tennessee', 'G9' = 'Florida State', 'G10' = 'Oklahoma State', 'G1' at line 1 [/quote] this is my query: [code]UPDATE  `picks` SET  'G8' =  'Middle Tennessee', 'G9' =  'Florida State', 'G10' =  'Oklahoma State', 'G11' =  'Rutgers', 'G12' =  'Texas A&M', 'G13' =  'Clemson', 'G14' =  'Oregon State', 'G15' =  'Houston', 'G16' =  'Texas Tech', 'G17' =  'Purdue', 'G18' =  'Navy', 'G19' =  'Texas', 'G20' =  'Georgia', 'G21' =  'Miami (Fla.)', 'G22' =  'Tennessee', 'G23' =  'Auburn', 'G24' =  'Arkansas', 'G25' =  'Georgia Tech', 'G26' =  'USC', 'G27' =  'Boise State', 'G28' =  'Louisville', 'G29' =  'Notre Dame', 'G30' =  'Western Michigan', 'G31' =  'Ohio', 'G32' =  'Florida', 'tiebreaker' =  '15', 'otRose' =  '10', 'otFiesta' =  '30', 'otOrange' =  '40', 'otSugar' =  '40', 'otBCS' =  '50' WHERE  'user_id' =  '9' LIMIT 1[/code]
  9. so, i would call that function on each radio button like this? [code]<td width=\"27\" class=\"fourth\"> <input name=\"F1\" type=\"radio\" value=\"$row[bowl_name]\" onChange=(checkRadio(1)) $F1selected /> </td> <td width=\"27\" class=\"fourth\"> <input name=\"F2\" type=\"radio\" value=\"$row[bowl_name]\" onChange=(checkRadio(2))$F2selected /> </td> <td width=\"27\" class=\"fourth\"> <input name=\"F3\" type=\"radio\" value=\"$row[bowl_name]\" onChange=(checkRadio(3))$F3selected /> </td> <td width=\"27\" class=\"fourth\"> <input name=\"F4\" type=\"radio\" value=\"$row[bowl_name]\" onChange=(checkRadio(4))$F4selected /> </td>[/code]
  10. Okay... I have this set of 4 different radio buttons.  Each column is a set.  I want an error message to pop up when someone tries to select 2 radio buttons in the same row.  Is that possible? [img]http://www.jwelchdesign.com/images/fourth.gif[/img]
  11. that worked.  thanks.  kinda frustrating that it was so simple.  is there a place that would help me understand what an error is really saying?
  12. I've got three tables: plays, formations, sets I'm trying to select just certain data from all three tables.  I can do that using the following: [code]SELECT formations.formation, sets.`set`, plays.play_name FROM plays LEFT JOIN sets ON plays.set_id = sets.set_id LEFT JOIN formations ON plays.formation_id = formations.formation_id[/code] I have to use the ` around sets like this: `set` otherwise i get an error that says: [quote]#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'set , plays . play_name  FROM plays  LEFT JOIN sets ON plays . set_id = sets . s' at line 1 [/quote]  Why is that? secondly, i want to select the formation, set, and play_name that have the 'SHOTGUN' formation.  So i do this: [code]SELECT formations.formation, sets.`set` , plays.play_name FROM plays LEFT JOIN sets ON plays.set_id = sets.set_id LEFT JOIN formations ON plays.formation_id = formations.formation_id WHERE ( formations.formation =  'SHOTGUN' ); MySQL said: #1194 - Table 'plays' is marked as crashed and should be repaired [/code] here's the layout of my database if you need it: [code]CREATE TABLE `formations` (   `formation_id` int(10) unsigned NOT NULL auto_increment,   `formation` varchar(50) NOT NULL,   PRIMARY KEY  (`formation_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=14 ; -- -- Dumping data for table `formations` -- INSERT INTO `formations` VALUES (6, 'GOALLINE'); INSERT INTO `formations` VALUES (5, 'SHOTGUN'); INSERT INTO `formations` VALUES (4, 'WEAK'); INSERT INTO `formations` VALUES (3, 'STRONG'); INSERT INTO `formations` VALUES (2, 'I-FORM'); INSERT INTO `formations` VALUES (1, 'ACE'); INSERT INTO `formations` VALUES (7, 'HAILMARY'); -- -------------------------------------------------------- -- -- Table structure for table `plays` -- CREATE TABLE `plays` (   `play_id` int(10) unsigned NOT NULL auto_increment,   `formation_id` int(11) NOT NULL,   `set_id` int(11) NOT NULL,   `play_name` varchar(25) NOT NULL,   `play_type` varchar(20) NOT NULL,   `type_id` int(11) NOT NULL,   `play_variable` tinyint(3) NOT NULL,   PRIMARY KEY  (`play_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=221 ; -- -- Dumping data for table `plays` -- INSERT INTO `plays` VALUES (1, 1, 1, 'Drive Comeback', 'Pass', 7, 0); INSERT INTO `plays` VALUES (2, 1, 1, 'HB Dive', 'Run', 1, 1); INSERT INTO `plays` VALUES (3, 1, 1, 'PA Strike', 'Pass', 9, 1); INSERT INTO `plays` VALUES (4, 1, 1, 'Backside Post', 'Pass', 8, 0); INSERT INTO `plays` VALUES (5, 1, 1, 'HB Counter', 'Run', 12, 1); INSERT INTO `plays` VALUES (6, 1, 1, 'Drag Under', 'Pass', 5, 0); INSERT INTO `plays` VALUES (7, 1, 1, 'Flood', 'Pass', 6, 0); INSERT INTO `plays` VALUES (8, 1, 1, 'HB Slam', 'Run', 1, 1); INSERT INTO `plays` VALUES (9, 1, 1, 'PA Rollout', 'Pass', 9, 1); INSERT INTO `plays` VALUES (10, 1, 1, 'Mesh', 'Pass', 5, 0); INSERT INTO `plays` VALUES (11, 1, 1, 'HB Toss', 'Run', 2, 1); INSERT INTO `plays` VALUES (12, 1, 1, 'Reverse Whip', 'Pass', 7, 0); INSERT INTO `plays` VALUES (13, 1, 1, 'Spacing', 'Pass', 6, 1); INSERT INTO `plays` VALUES (14, 1, 1, 'Speed Option', 'Run', 3, 2); INSERT INTO `plays` VALUES (15, 1, 1, 'Vertical', 'Pass', 8, 1); INSERT INTO `plays` VALUES (16, 2, 2, 'Counter Lead', 'Run', 12, 1); INSERT INTO `plays` VALUES (17, 2, 2, 'PA Screen', 'Pass', 10, 2); INSERT INTO `plays` VALUES (18, 2, 2, 'FB Dive', 'Run', 1, 1); INSERT INTO `plays` VALUES (19, 2, 2, 'HB Iso', 'Run', 1, 1); INSERT INTO `plays` VALUES (20, 2, 2, 'PA FB Flat', 'Pass', 9, 1); INSERT INTO `plays` VALUES (21, 2, 2, 'HB Zone', 'Run', 13, 1); INSERT INTO `plays` VALUES (22, 2, 2, 'Motion All Go', 'Pass', 8, 0); INSERT INTO `plays` VALUES (23, 2, 2, 'HB Slam', 'Run', 1, 1); INSERT INTO `plays` VALUES (24, 2, 2, 'PA Boot', 'Pass', 9, 1); INSERT INTO `plays` VALUES (25, 2, 2, 'PA Toss Screen', 'Pass', 14, 2); INSERT INTO `plays` VALUES (26, 2, 2, 'Lead Toss', 'Run', 2, 1); INSERT INTO `plays` VALUES (27, 2, 2, 'China Special', 'Pass', 6, 1); INSERT INTO `plays` VALUES (28, 2, 2, 'Weak Counter', 'Run', 12, 1); INSERT INTO `plays` VALUES (29, 2, 2, 'PA TE Drag', 'Pass', 9, 1); INSERT INTO `plays` VALUES (30, 2, 2, 'Triple Option', 'Run', 3, 3); INSERT INTO `plays` VALUES (31, 3, 3, 'Counter Weak', 'Run', 12, 1); INSERT INTO `plays` VALUES (32, 3, 3, 'WR Crosses', 'Pass', 6, 1); INSERT INTO `plays` VALUES (33, 3, 3, 'FB Over', 'Run', 1, 1); INSERT INTO `plays` VALUES (34, 3, 3, 'HB Sting', 'Run', 1, 1); INSERT INTO `plays` VALUES (35, 3, 3, 'PA End Around', 'Pass', 9, 2); INSERT INTO `plays` VALUES (36, 3, 3, 'End Around', 'Run', 2, 1); INSERT INTO `plays` VALUES (37, 3, 3, 'HB Dive', 'Run', 1, 1); INSERT INTO `plays` VALUES (38, 3, 3, 'PA HB Flat', 'Pass', 9, 0); INSERT INTO `plays` VALUES (39, 3, 3, 'Toss Strong', 'Run', 2, 1); INSERT INTO `plays` VALUES (40, 3, 3, 'HB Read', 'Run', 13, 1); INSERT INTO `plays` VALUES (41, 3, 3, 'PA Boot', 'Pass', 9, 1); INSERT INTO `plays` VALUES (42, 3, 3, 'HB Slam', 'Run', 1, 1); INSERT INTO `plays` VALUES (43, 3, 3, 'Triple Option', 'Run', 3, 3); INSERT INTO `plays` VALUES (44, 3, 3, 'WR Corners', 'Pass', 7, 1); INSERT INTO `plays` VALUES (45, 3, 3, 'Tr Option Rev', 'Run', 3, 3); INSERT INTO `plays` VALUES (46, 5, 4, 'Slot Corner', 'Pass', 6, 0); INSERT INTO `plays` VALUES (47, 5, 4, 'Double Option', 'Run', 3, 3); INSERT INTO `plays` VALUES (48, 5, 4, 'Option Pass', 'Pass', 9, 0); INSERT INTO `plays` VALUES (49, 5, 4, 'Angle', 'Pass', 6, 1); INSERT INTO `plays` VALUES (50, 5, 4, 'HB Off Tackle', 'Run', 1, 1); INSERT INTO `plays` VALUES (51, 5, 4, 'PA F Slide', 'Pass', 9, 0); INSERT INTO `plays` VALUES (52, 5, 4, 'WR Unders', 'Pass', 5, 1); INSERT INTO `plays` VALUES (53, 5, 4, 'QB Wrap', 'Run', 3, 2); INSERT INTO `plays` VALUES (54, 5, 4, 'RB Deep', 'Pass', 6, 0); INSERT INTO `plays` VALUES (55, 5, 4, 'Dbl RB Opt Lt', 'Run', 3, 3); INSERT INTO `plays` VALUES (56, 5, 4, 'Strike', 'Pass', 8, 0); INSERT INTO `plays` VALUES (57, 5, 4, 'Speed Option', 'Run', 3, 2); INSERT INTO `plays` VALUES (58, 5, 4, 'Slants', 'Pass', 5, 0); INSERT INTO `plays` VALUES (59, 5, 4, 'QB Slot Option', 'Run', 3, 3); INSERT INTO `plays` VALUES (60, 5, 4, 'WR Middle', 'Pass', 6, 1); INSERT INTO `plays` VALUES (61, 5, 4, 'In N'' Up', 'Pass', 7, 0); INSERT INTO `plays` VALUES (62, 5, 4, 'HB Draw', 'Run', 4, 1); INSERT INTO `plays` VALUES (63, 5, 4, 'PA Corner', 'Pass', 9, 1); INSERT INTO `plays` VALUES (64, 5, 5, 'All Curls', 'Pass', 5, 0); INSERT INTO `plays` VALUES (65, 5, 5, 'Inside Draw', 'Run', 4, 1); INSERT INTO `plays` VALUES (66, 5, 5, 'PA Middle', 'Pass', 9, 1); INSERT INTO `plays` VALUES (67, 5, 5, 'Clear FL Under', 'Pass', 6, 0); INSERT INTO `plays` VALUES (68, 5, 5, 'Bunch Toss Rt', 'Run', 2, 1); INSERT INTO `plays` VALUES (69, 5, 5, 'Fork Angle', 'Pass', 7, 0); INSERT INTO `plays` VALUES (70, 5, 5, 'PA Read', 'Pass', 9, 0); INSERT INTO `plays` VALUES (71, 5, 5, 'QB Choice', 'Run', 3, 2); INSERT INTO `plays` VALUES (72, 5, 5, 'Corner Combo', 'Pass', 6, 0); INSERT INTO `plays` VALUES (73, 5, 5, 'Cross Wheel', 'Pass', 7, 0); INSERT INTO `plays` VALUES (74, 5, 5, 'HB Zone', 'Run', 13, 1); INSERT INTO `plays` VALUES (75, 5, 5, 'FL Special', 'Pass', 6, 1); INSERT INTO `plays` VALUES (76, 5, 5, 'HB Direct', 'Run', 2, 1); INSERT INTO `plays` VALUES (77, 5, 5, 'HB Out', 'Pass', 7, 5); INSERT INTO `plays` VALUES (78, 5, 5, 'QB Power', 'Run', 1, 1); INSERT INTO `plays` VALUES (79, 5, 5, 'HB Screen', 'Pass', 10, 5); INSERT INTO `plays` VALUES (80, 5, 5, 'Speed Option', 'Run', 3, 2); INSERT INTO `plays` VALUES (81, 5, 5, 'Option Pass', 'Pass', 9, 0); INSERT INTO `plays` VALUES (82, 5, 6, 'Curl Flat', 'Pass', 5, 5); INSERT INTO `plays` VALUES (83, 5, 6, 'HB Off Tackle', 'Run', 2, 1); INSERT INTO `plays` VALUES (84, 5, 6, 'PA WR In', 'Pass', 9, 0); INSERT INTO `plays` VALUES (85, 5, 6, 'Corners', 'Pass', 8, 1); INSERT INTO `plays` VALUES (86, 5, 6, 'Inside Draw', 'Run', 4, 1); INSERT INTO `plays` VALUES (87, 5, 6, 'HB Screen', 'Pass', 10, 1); INSERT INTO `plays` VALUES (88, 5, 6, 'HB Corner', 'Pass', 7, 0); INSERT INTO `plays` VALUES (89, 5, 6, 'QB Power', 'Run', 1, 1); INSERT INTO `plays` VALUES (90, 5, 6, 'Slot Cross', 'Pass', 7, 0); INSERT INTO `plays` VALUES (91, 5, 6, 'Speed Option', 'Run', 3, 2); INSERT INTO `plays` VALUES (92, 5, 6, 'Option Pass', 'Pass', 9, 2); INSERT INTO `plays` VALUES (93, 5, 6, 'HB Direct', 'Run', 2, 1); INSERT INTO `plays` VALUES (94, 5, 6, 'PA Read', 'Pass', 9, 0); INSERT INTO `plays` VALUES (95, 5, 6, 'QB Choice', 'Run', 3, 2); INSERT INTO `plays` VALUES (96, 5, 6, 'WR Drag', 'Pass', 5, 0); INSERT INTO `plays` VALUES (97, 5, 6, 'QB Slot Option', 'Run', 3, 3); INSERT INTO `plays` VALUES (98, 5, 6, 'Smash Shake', 'Pass', 6, 0); INSERT INTO `plays` VALUES (99, 5, 6, 'QB Wrap', 'Run', 3, 2); INSERT INTO `plays` VALUES (100, 4, 7, 'HB Weak', 'Run', 2, 1); INSERT INTO `plays` VALUES (101, 4, 7, 'PA Rollout', 'Pass', 9, 1); INSERT INTO `plays` VALUES (102, 4, 7, 'FB Over', 'Run', 1, 1); INSERT INTO `plays` VALUES (103, 4, 7, 'WR Curls', 'Pass', 5, 1); INSERT INTO `plays` VALUES (104, 4, 7, 'HB Counter', 'Run', 12, 1); INSERT INTO `plays` VALUES (105, 4, 7, 'Slot Cross', 'Pass', 6, 1); INSERT INTO `plays` VALUES (106, 4, 7, 'Slot Post', 'Pass', 8, 0); INSERT INTO `plays` VALUES (107, 4, 7, 'HB Smash', 'Run', 1, 1); INSERT INTO `plays` VALUES (108, 4, 7, 'PA FB Streak', 'Pass', 9, 1); INSERT INTO `plays` VALUES (109, 4, 7, 'Short Posts', 'Pass', 5, 1); INSERT INTO `plays` VALUES (110, 4, 7, 'Triple Option', 'Run', 3, 3); INSERT INTO `plays` VALUES (111, 4, 7, 'Option Pass', 'Pass', 9, 2); INSERT INTO `plays` VALUES (112, 4, 7, 'RB Corner', 'Pass', 7, 0); INSERT INTO `plays` VALUES (113, 4, 7, 'Power Option', 'Run', 3, 2); INSERT INTO `plays` VALUES (114, 4, 7, 'WR Corner', 'Pass', 7, 1); INSERT INTO `plays` VALUES (115, 4, 7, 'Hitch ''N Go', 'Pass', 8, 1); INSERT INTO `plays` VALUES (116, 4, 7, 'HB Blast', 'Run', 1, 1); INSERT INTO `plays` VALUES (117, 4, 7, 'WR Drag', 'Pass', 5, 1); INSERT INTO `plays` VALUES (118, 1, 8, 'TE Wheel', 'Pass', 7, 1); INSERT INTO `plays` VALUES (119, 1, 8, 'HB Slam', 'Run', 1, 1); INSERT INTO `plays` VALUES (120, 1, 8, 'PA Rollout', 'Pass', 9, 1); INSERT INTO `plays` VALUES (121, 1, 8, 'Counter Option', 'Run', 3, 2); INSERT INTO `plays` VALUES (122, 1, 8, 'TE Drag', 'Pass', 6, 1); INSERT INTO `plays` VALUES (123, 1, 8, 'HB Toss', 'Run', 2, 1); INSERT INTO `plays` VALUES (124, 1, 8, 'Cross In', 'Pass', 5, 0); INSERT INTO `plays` VALUES (125, 1, 8, 'HB Dive', 'Run', 1, 1); INSERT INTO `plays` VALUES (126, 1, 8, 'PA TE Crosses', 'Pass', 9, 1); INSERT INTO `plays` VALUES (127, 1, 8, 'Counter Trap', 'Run', 12, 1); INSERT INTO `plays` VALUES (128, 1, 8, 'Corners', 'Pass', 6, 0); INSERT INTO `plays` VALUES (129, 1, 8, 'HB Draw', 'Run', 4, 1); INSERT INTO `plays` VALUES (130, 1, 8, 'TE Flag', 'Pass', 6, 0); INSERT INTO `plays` VALUES (131, 1, 8, 'HB Option', 'Run', 3, 2); INSERT INTO `plays` VALUES (132, 1, 8, 'HB Screen', 'Pass', 10, 1); INSERT INTO `plays` VALUES (133, 1, 8, 'HB Read', 'Run', 13, 1); INSERT INTO `plays` VALUES (134, 1, 8, 'FL Post', 'Pass', 7, 0); INSERT INTO `plays` VALUES (135, 1, 8, 'HB Blast', 'Run', 1, 1); INSERT INTO `plays` VALUES (136, 5, 9, 'Curl Flats', 'Pass', 5, 0); INSERT INTO `plays` VALUES (137, 5, 9, 'HB Draw', 'Run', 4, 1); INSERT INTO `plays` VALUES (138, 5, 9, 'PA WR In', 'Pass', 9, 1); INSERT INTO `plays` VALUES (139, 5, 9, 'Flood', 'Pass', 8, 0); INSERT INTO `plays` VALUES (140, 5, 9, 'HB Zone', 'Run', 13, 1); INSERT INTO `plays` VALUES (141, 5, 9, 'Clearout Stop', 'Pass', 8, 0); INSERT INTO `plays` VALUES (142, 5, 9, 'Gambler', 'Pass', 6, 0); INSERT INTO `plays` VALUES (143, 5, 9, 'Zone Read', 'Run', 3, 2); INSERT INTO `plays` VALUES (144, 5, 9, 'PA All Cross', 'Pass', 9, 0); INSERT INTO `plays` VALUES (145, 5, 9, 'HB Screen', 'Pass', 10, 0); INSERT INTO `plays` VALUES (146, 5, 9, 'Speed Option', 'Run', 3, 2); INSERT INTO `plays` VALUES (147, 5, 9, 'Trips Attack', 'Pass', 6, 0); INSERT INTO `plays` VALUES (148, 5, 9, 'WR Drag', 'Pass', 7, 0); INSERT INTO `plays` VALUES (149, 5, 9, 'Motion WR Option', 'Run', 3, 3); INSERT INTO `plays` VALUES (150, 5, 9, 'Slants', 'Pass', 5, 0); INSERT INTO `plays` VALUES (151, 5, 9, 'In Out Combo', 'Pass', 7, 0); INSERT INTO `plays` VALUES (152, 5, 9, 'QB Wrap', 'Run', 3, 2); INSERT INTO `plays` VALUES (153, 5, 9, 'Wheelie', 'Pass', 7, 0); INSERT INTO `plays` VALUES (154, 5, 10, 'Deep Strike', 'Pass', 8, 0); INSERT INTO `plays` VALUES (155, 5, 10, 'QB Choice', 'Run', 3, 2); INSERT INTO `plays` VALUES (156, 5, 10, 'Slot Whips', 'Pass', 5, 0); INSERT INTO `plays` VALUES (157, 5, 10, 'Slot Crosses', 'Pass', 6, 1); INSERT INTO `plays` VALUES (158, 5, 10, 'HB Direct', 'Run', 2, 1); INSERT INTO `plays` VALUES (159, 5, 10, 'Solo 7565', 'Pass', 7, 0); INSERT INTO `plays` VALUES (160, 5, 10, 'Slot Seams', 'Pass', 8, 0); INSERT INTO `plays` VALUES (161, 5, 10, 'Motion WR Option', 'Run', 3, 3); INSERT INTO `plays` VALUES (162, 5, 10, 'Quick Slants', 'Pass', 5, 0); INSERT INTO `plays` VALUES (163, 5, 10, 'HB Screen', 'Pass', 10, 0); INSERT INTO `plays` VALUES (164, 5, 10, 'QB Z Option', 'Run', 3, 3); INSERT INTO `plays` VALUES (165, 5, 10, 'Scissors', 'Pass', 7, 0); INSERT INTO `plays` VALUES (166, 5, 10, 'SE Drag', 'Pass', 8, 0); INSERT INTO `plays` VALUES (167, 5, 10, 'HB Zone', 'Run', 13, 1); INSERT INTO `plays` VALUES (168, 5, 10, 'PA Read', 'Pass', 9, 0); INSERT INTO `plays` VALUES (169, 5, 10, 'Corner Strike', 'Pass', 8, 0); INSERT INTO `plays` VALUES (170, 5, 10, 'Inside Draw', 'Run', 4, 1); INSERT INTO `plays` VALUES (171, 5, 10, 'PA Flood', 'Pass', 9, 1); INSERT INTO `plays` VALUES (172, 5, 10, 'WR Short Posts', 'Pass', 5, 1); INSERT INTO `plays` VALUES (173, 5, 10, 'Comeback Shake', 'Pass', 7, 0); INSERT INTO `plays` VALUES (174, 5, 10, 'WR Curls', 'Pass', 5, 0); INSERT INTO `plays` VALUES (175, 5, 10, 'HB Go', 'Pass', 8, 0); INSERT INTO `plays` VALUES (176, 5, 10, 'QB Power', 'Run', 1, 1); INSERT INTO `plays` VALUES (177, 5, 10, 'SE Drive', 'Pass', 7, 1); INSERT INTO `plays` VALUES (178, 5, 10, 'Slot Wheels', 'Pass', 8, 1); INSERT INTO `plays` VALUES (179, 5, 10, 'Speed Option', 'Run', 3, 2); INSERT INTO `plays` VALUES (180, 5, 10, 'Option Pass', 'Pass', 9, 1); INSERT INTO `plays` VALUES (181, 5, 11, 'Angle Post', 'Pass', 5, 0); INSERT INTO `plays` VALUES (182, 5, 11, 'HB Zone', 'Run', 13, 1); INSERT INTO `plays` VALUES (183, 5, 11, 'PA Dagger', 'Pass', 9, 1); INSERT INTO `plays` VALUES (184, 5, 11, 'Corners', 'Pass', 7, 1); INSERT INTO `plays` VALUES (185, 5, 11, 'QB Wrap', 'Run', 3, 2); INSERT INTO `plays` VALUES (186, 5, 11, 'PA QB Choice', 'Pass', 9, 1); INSERT INTO `plays` VALUES (187, 5, 11, 'Drive', 'Pass', 7, 0); INSERT INTO `plays` VALUES (188, 5, 11, 'HB Direct', 'Run', 2, 1); INSERT INTO `plays` VALUES (189, 5, 11, 'HB Screen', 'Pass', 10, 0); INSERT INTO `plays` VALUES (190, 5, 11, 'Slot Cross', 'Pass', 6, 0); INSERT INTO `plays` VALUES (191, 5, 11, 'QB Slot Option', 'Run', 3, 3); INSERT INTO `plays` VALUES (192, 5, 11, 'Slot Screen', 'Pass', 14, 1); INSERT INTO `plays` VALUES (193, 5, 11, 'WR Drag', 'Pass', 5, 1); INSERT INTO `plays` VALUES (194, 5, 11, 'Speed Option', 'Run', 3, 2); INSERT INTO `plays` VALUES (195, 5, 11, 'Slot Corner', 'Pass', 6, 1); INSERT INTO `plays` VALUES (196, 5, 11, 'Curl Flats', 'Pass', 5, 0); INSERT INTO `plays` VALUES (197, 5, 11, 'Motion WR Option', 'Run', 3, 3); INSERT INTO `plays` VALUES (198, 5, 11, 'In Out Combo', 'Pass', 7, 0); INSERT INTO `plays` VALUES (199, 5, 11, 'Backside In', 'Pass', 7, 0); INSERT INTO `plays` VALUES (200, 5, 11, 'HB Draw', 'Run', 4, 1); INSERT INTO `plays` VALUES (201, 5, 11, 'PA WR In', 'Pass', 9, 1); INSERT INTO `plays` VALUES (202, 5, 12, 'Curl Flats', 'Pass', 5, 0); INSERT INTO `plays` VALUES (203, 5, 12, 'QB Draw', 'Run', 4, 1); INSERT INTO `plays` VALUES (204, 5, 12, 'Drive', 'Pass', 7, 0); INSERT INTO `plays` VALUES (205, 5, 12, 'Middle Attack', 'Pass', 8, 0); INSERT INTO `plays` VALUES (206, 5, 12, 'Middle Clear', 'Pass', 7, 0); INSERT INTO `plays` VALUES (207, 5, 12, 'Post Cross', 'Pass', 6, 0); INSERT INTO `plays` VALUES (208, 5, 12, 'Shallow Cross', 'Pass', 5, 0); INSERT INTO `plays` VALUES (209, 5, 12, 'Slot Hitches', 'Pass', 5, 0); INSERT INTO `plays` VALUES (210, 5, 12, 'SE Post', 'Pass', 7, 0); INSERT INTO `plays` VALUES (211, 5, 12, 'Wheelies', 'Pass', 8, 0); INSERT INTO `plays` VALUES (212, 5, 12, 'Quick Slants', 'Pass', 5, 0); INSERT INTO `plays` VALUES (215, 5, 12, 'Whip Outs', 'Pass', 6, 0); INSERT INTO `plays` VALUES (216, 5, 12, 'Under Cross', 'Pass', 6, 0); INSERT INTO `plays` VALUES (217, 5, 12, 'WR Screens', 'Pass', 14, 0); INSERT INTO `plays` VALUES (218, 5, 12, 'Motion WR Option', 'Run', 3, 2); -- -------------------------------------------------------- -- -- Table structure for table `sets` -- CREATE TABLE `sets` (   `set_id` int(10) unsigned NOT NULL auto_increment,   `set` varchar(25) NOT NULL,   `wr` int(1) NOT NULL,   `te` int(1) NOT NULL,   `rb` int(10) NOT NULL,   PRIMARY KEY  (`set_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=13 ; -- -- Dumping data for table `sets` -- INSERT INTO `sets` VALUES (1, 'BIG BUNCH', 2, 2, 1); INSERT INTO `sets` VALUES (2, 'TWINS FLEX', 2, 1, 2); INSERT INTO `sets` VALUES (3, 'CLOSE', 2, 1, 2); INSERT INTO `sets` VALUES (4, '2 BACK SLOT', 3, 0, 2); INSERT INTO `sets` VALUES (5, 'BIG BUNCH STR', 2, 2, 1); INSERT INTO `sets` VALUES (6, 'SLOT F TRIPS', 3, 0, 2); INSERT INTO `sets` VALUES (7, 'SLOT', 3, 0, 2); INSERT INTO `sets` VALUES (8, 'BIG WING TWINS', 2, 2, 1); INSERT INTO `sets` VALUES (9, '4WR TRIO', 4, 0, 1); INSERT INTO `sets` VALUES (10, 'SPREAD FLEX', 4, 0, 1); INSERT INTO `sets` VALUES (11, '4WR TREY', 4, 0, 1); INSERT INTO `sets` VALUES (12, '5WR TRIO', 5, 0, 0);[/code]
  13. i played with it more and got it.  nm [code] $query = "INSERT INTO `team_stats` (`team_stat_id`, `game_id`, `year_id`, `home_away_id`, `team`, `mascot`, `abbr`, `rank`, `record`, `score`, `q1`, `q2`, `q3`, `q4`, `ot`, `firstdowns`, `totoff`, `rush_att_yds`, `pass_att_comp`, `passyds`, `sacked`, `third`, `redzone`, `to`, `fum`, `int`, `pryds`, `kryds`, `totyds`, `top`) VALUES (NULL, '{$_POST[gm]}', '1', '2', '{$_POST[away]}', '{$_POST[away_mascot]}', '{$_POST[away_abbr]}', '{$_POST[away_rank]}', '{$_POST[record]}', '{$_POST[score]}', '{$_POST[q1]}', '{$_POST[q2]}', '{$_POST[q3]}', '{$_POST[q4]}', '{$_POST[ot]}', '{$_POST[firstdowns]}', '{$_POST[totoff]}', '{$_POST[rush_att_yds]}', '{$_POST[pass_att_comp]}', '{$_POST[passyds]}', '{$_POST[sacked]}', '{$_POST[third]}', '{$_POST[redzone]}', '{$_POST[to]}', '{$_POST[fum]}', '{$_POST[int]}', '{$_POST[pryds]}', '{$_POST[kryds]}', '{$_POST[totyds]}', '{$_POST[top]}'), (NULL, '{$_POST[gm]}', '1', '1', '{$_POST[home]}', '{$_POST[home_mascot]}', '{$_POST[home_abbr]}', '{$_POST[home_rank]}', '{$_POST[record2]}', '{$_POST[score2]}', '{$_POST[q12]}', '{$_POST[q22]}', '{$_POST[q32]}', '{$_POST[q42]}', '{$_POST[ot2]}', '{$_POST[firstdowns2]}', '{$_POST[totoff2]}', '{$_POST[rush_att_yds2]}', '{$_POST[pass_att_comp2]}', '{$_POST[passyds2]}', '{$_POST[sacked2]}', '{$_POST[third2]}', '{$_POST[redzone2]}', '{$_POST[to2]}', '{$_POST[fum2]}', '{$_POST[int2]}', '{$_POST[pryds2]}', '{$_POST[kryds2]}', '{$_POST[totyds2]}', '{$_POST[top2]}');"; [/code]
  14. i can do it fine in phpMyAdmin.  I basically inserted 1 row of info in phpMyAdmin and copied the query as my guide. this is the query: [code]$query = "INSERT INTO team_stats (team_stat_id, game_id, year_id, home_away_id, team, mascot, abbr, rank, record, score, q1, q2, q3, q4, ot, firstdowns, totoff, rush_att_yds, pass_att_comp, passyds, sacked, third, redzone, to, fum, int, pryds, kryds, totyds, top) VALUES (NULL, {$_POST[gm]}, 1, 2, {$_POST[away]}, {$_POST[away_mascot]}, {$_POST[away_abbr]}, {$_POST[away_rank]}, {$_POST[record]}, {$_POST[score]}, {$_POST[q1]}, {$_POST[q2]}, {$_POST[q3]}, {$_POST[q4]}, {$_POST[ot]}, {$_POST[firstdowns]}, {$_POST[totoff]}, {$_POST[rush_att_yds]}, {$_POST[pass_att_comp]}, {$_POST[passyds]}, {$_POST[sacked]}, {$_POST[third]}, {$_POST[redzone]}, {$_POST[to]}, {$_POST[fum]}, {$_POST[int]}, {$_POST[pryds]}, {$_POST[kryds]}, {$_POST[totyds]}, {$_POST[top]})";[/code] i echo the query in the page and this is what it looks like: [code]INSERT INTO team_stats (team_stat_id, game_id, year_id, home_away_id, team, mascot, abbr, rank, record, score, q1, q2, q3, q4, ot, firstdowns, totoff, rush_att_yds, pass_att_comp, passyds, sacked, third, redzone, to, fum, int, pryds, kryds, totyds, top) VALUES (NULL, 3, 1, 2, Tennessee, Volunteers, TENN, 17, 2-2, 21, 7, 7, 7, 0, -, 9, 256, 14-16, 16-24-3, 240, 5, 3-8, 3-3-0, 3, 4-2, 1, 0, 109, 365, 9:22)[/code] this is the error the page prints out: [code]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'to, fum, int, pryds, kryds, totyds, top) VALUES (NULL, 3, 1, 2, Tennessee, Volun' at line 1[/code] what's wrong with it?
  15. i have three arrays: [code]Array "ONE" (     [0] => Vince     [1] => Papale     [2] => 1     [3] => 46     [4] => 46     [5] => 0     [6] => 46 ) Array "TWO" (     [0] => Brian     [1] => Pollard     [2] => 10     [3] => 293     [4] => 29.3     [5] => 4     [6] => 77 ) Array "THREE" (     [0] => Johnny     [1] => King     [2] => 3     [3] => 34     [4] => 10.3     [5] => 2     [6] => 16 )[/code] the arrays are named, ONE, TWO, and THREE. i want to be able to sort them according to different keys. for example: i want the arrays to be be in order of their 2nd key. so the order would be: TWO THREE ONE How would i do that?
  16. thanks... i tried array_flip too and that worked, but your way is better.
  17. i have an array in the format: [family] => day that they have a reservation [code]eventsArray (     [Jason & Deena] => 29     [Bob & Krista] => 9     [Marolyn] => 15     [J&D] => 17     [bob & sally] => 22     [Bob & Sally] => 25 )[/code] I want to search throught the array and if there is an event on that day, print the key for it.  In this case the key is the name of the family. [code]for ($i=1; $i<=31; $i++) { if (in_array($i, $eventsArray)) { echo "yes, there is an event on $i<br>"; } }[/code] how do i get the name of the key that has the value $i?
  18. Awesome!  That worked... for the individual month.  But it doesn't carry over to the next month. you can go to my calendar and see http://oc.jwelchdesign.com but between Dec 2006 & Jan 2007, the last week of December is green.  The first week of Jan. '07 is part of that last week, but it's blue. Is there a way to fix that? Thanks for the help so far though, that was way easier than I thought.
  19. I'm making a event calendar for a family vacation home.  It alternates between sides of the family who gets a crack at staying there.   Well, I need my calendar to show that.  I'm able to get alternating rows to be displayed differently by: [code] if ($currentRow % 2 == 0) { $row = "evenrow"; } else { $row = "oddrow"; } [/code] i have 2 styles (evenrow & oddrow obviously) that will make the date a different color. That's relatively easy, but what I'm wanting to do is a little more complex i think. The "weeks" for the cabin are friday-thursday.  And I basically just want the styling that I had for the rows to be for the cabin's weeks. Any ideas?  I'm pretty lost on this one. you can view the calendar at http://oc.jwelchdesign.com here's my entire calendar code: [code]<link href="css/first.css" rel="stylesheet" type="text/css"> <?php function readCalendarData ($month, $year) { // OPEN DATABASE CONNECTION $dbLink = mysql_connect ($dbHost, $dbUser, $dbPass); if (!$dbLink) { die ("Database: Couldn't connect to the MySQL Server"); } mysql_select_db ($dbName, $dbLink) or die ("Database: Couldn't open Database"); // CREATE TIMESTAMPS TO SEARCH WITH $firstDayTimestamp = mktime (0,0,0, $month, 1, $year); $daysInMonth = date ("t", $firstDayTimestamp); $lastDayTimestamp = mktime (23, 59, 59, $month, $daysInMonth, $year); // CREATE SQL $sql = "SELECT id, UNIX_TIMESTAMP(dateField) AS timestampField "; $sql .= "FROM ocCalendar "; $sql .= "WHERE UNIX_TIMESTAMP(dateField) >= " . $firstDayTimestamp . " AND UNIX_TIMESTAMP(dateField) <= " . $lastDayTimestamp . " "; $sql .= "ORDER BY timestampField ASC"; // READ IN DATA $dbResult = mysql_query($sql, $dbLink) or die ("MYSQL Error: " . mysql_error() ); $numRecords = mysql_num_rows ($dbResult); $eventsArray[] = ""; for ($i=0; $i < $numRecords; $i++) { $row = mysql_fetch_assoc ($dbResult); $day = date ("j", $row['timestampField']); // CHECK DATE ISN'T ALREADY IN $eventsArray if(!in_array($day, $eventsArray)) { $eventsArray[] = $day; } } // CLOSE DB CONNECTION mysql_close($dbLink); // RETURN eventsArray TO CODE THAT CALLED FUNCTION return $eventsArray; } if ($submit) { // Subtract one from month for prev and add 1 for next if ($submit == "submit") { $month_now = $_POST['month']; $year_now = $_POST['year']; } elseif ($submit == "Prev") { $month_now--; } else { $month_now++; } $date = getdate(mktime(0,0,0,$month_now, 1, $year_now)); } else { $date = getdate(); } $month = $date["mon"]; $monthName = $date["month"]; $year = $date["year"]; $wday = $date["wday"]; $eventsArray = readCalendarData($month, $year); $firstDay = mktime (0,1,0, $month, 1, $year); $firstDay = date ("w", $firstDay); $daysInMonth = date ("t", $firstDay); echo " <div id=\"beachcal\"> <form id=\"calendar\" name=\"calendar\" method=\"post\" action=\"index.php\"> <table width=\"600\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\"> <tr><input type=\"hidden\" name=\"month_now\" value=\"$month\" /><input type=\"hidden\" name=\"year_now\" value=\"$year\" />     <td colspan=\"7\" class=\"headRow\"><input type=\"submit\" name=\"submit\" value=\"Prev\" /><span class=\"theMonth\">$monthName $year</span><input type=\"submit\" name=\"submit\" value=\"Next\" /></td> </tr> <tr class=\"headerDays\"> <td>sun</td> <td>mon</td> <td>tue</td> <td>wed</td> <td>thur</td> <td>fri</td> <td>sat</td> </tr>\n"; #CALCULATE NUMBER OF ROWS $totalCells = $firstDay + $daysInMonth; if ($totalCells < 36) { $rowNumber = 5; } else { $rowNumber = 6; } $dayNumber = 1; for ($currentRow=1; $currentRow <= $rowNumber; $currentRow++) { if ($currentRow % 2 == 0) { $row = "evenrow"; } else { $row = "oddrow"; } if ($currentRow == 1) { #CREATE FIRST ROW echo "<tr class=\"$row\">\n"; for ($currentCell = 0; $currentCell < 7; $currentCell++) { // CHECK IF IT'S THE FIRST DAY OF THE MONTH if ($currentCell == $firstDay) { $day = $dayNumber . "/" . $month . "/" . $year; $link = "<a href=\"details.php?day=$day\">$dayNumber</a>"; $alink = "<a href=\"add_event.php?day=$day\">$dayNumber</a>"; if (in_array($dayNumber, $eventsArray)) { echo "<td class=\"reserved\"><div id=\"day\">$link</div><div id=\"event\"></div></td>\n"; } else { echo "<td><div id=\"day\">$alink</div><div id=\"event\"></div></td>\n"; } $dayNumber++; } else { // IF THE FIRST DAY IS PASSED OUTPUT THE DATE if ($dayNumber > 1) { $day = $dayNumber . "/" . $month . "/" . $year; $link = "<a href=\"details.php?day=$day\">$dayNumber</a>"; $alink = "<a href=\"add_event.php?day=$day\">$dayNumber</a>"; if (in_array($dayNumber, $eventsArray)) { echo "<td class=\"reserved\"><div id=\"day\">$link</div><div id=\"event\"></div></td>\n"; } else { echo "<td><div id=\"day\">$alink</div><div id=\"event\"></div></td>\n"; } $dayNumber++; } else { // FIRST DAY NOT REACHED SO DISPLAY A BLANK CELL echo "<td class=\"otherMonth\">&nbsp;</td>\n"; } } } echo "</tr>\n"; } else { #CREATE THE REMAINING ROWS echo "<tr class=\"$row\">\n"; for ($currentCell=0; $currentCell < 7; $currentCell++) { $day = $dayNumber . "/" . $month . "/" . $year; $link = "<a href=\"details.php?day=$day\">$dayNumber</a>"; $alink = "<a href=\"add_event.php?day=$day\">$dayNumber</a>"; // IF THE DAYS IN THE MONTH ARE EXCEEDED DISPLAY A BLANK CELL if ($dayNumber > $daysInMonth) { echo "<td class=\"otherMonth\">&nbsp;</td>\n"; } else { if (in_array($dayNumber, $eventsArray)) { echo "<td class=\"reserved\"><div id=\"day\">$link</div><div id=\"event\"></div></td>\n"; } else { echo "<td><div id=\"day\">$alink</div><div id=\"event\"></div></td>\n"; } $dayNumber++; } } echo "</tr>\n"; } } echo "</table>"; $month_array = array("January" => 1, "February" => 2, "March" => 3, "April" => 4, "May" => 5, "June" => 6, "July" => 7, "August" => 8, "September" => 9, "October" => 10, "November" => 11, "December" => 12); echo "<select name=\"month\">"; foreach ($month_array as $m => $key) { if ($monthName == $m) { echo "<option value=\"$key\" selected=\"selected\">$m</option>\n"; } else { echo "<option value=\"$key\">$m</option>\n"; } } echo "</select>"; echo "<select name=\"year\">"; for ($i=$year; $i<=$year+2; $i++) { echo "<option value=\"$i\">$i</option>\n"; } echo "</select> <input type=\"submit\" name=\"submit\" value=\"submit\" /> </form> </div>"; ?> [/code]
  20. [!--quoteo(post=381977:date=Jun 9 2006, 10:51 AM:name=XRayden)--][div class=\'quotetop\']QUOTE(XRayden @ Jun 9 2006, 10:51 AM) [snapback]381977[/snapback][/div][div class=\'quotemain\'][!--quotec--] can you popst a .zip of your webpage (at least the html/css/images) ? [/quote] you can download a zip of everything [a href=\"http://www.jwelchdesign.com/ao/2006css_example.zip\" target=\"_blank\"]here[/a] [!--quoteo(post=381969:date=Jun 9 2006, 10:35 AM:name=moberemk)--][div class=\'quotetop\']QUOTE(moberemk @ Jun 9 2006, 10:35 AM) [snapback]381969[/snapback][/div][div class=\'quotemain\'][!--quotec--] I just don't get why it is that you're using images for that. You could probably pull that effect off with just plain CSS and text. [/quote] because i tried, but it took a really long time. I'm doing for my brother who designed it in photoshop. Gave me the psd. He's not very good at css and coding so i do it for him. If i gave you the psd file... could you show me how to pull that all off with css and text? I finally got it working! I took out the floats and it works fine. I does anyone know why IE doesn't like floats then?
  21. here's the problem... this is what it looks like in safari and firefox: [img src=\"http://www.jwelchdesign.com/images/safari.gif\" border=\"0\" alt=\"IPB Image\" /] and this is what it looks like in IE: [img src=\"http://www.jwelchdesign.com/images/ie.gif\" border=\"0\" alt=\"IPB Image\" /] [!--quoteo(post=381748:date=Jun 8 2006, 10:43 PM:name=XRayden)--][div class=\'quotetop\']QUOTE(XRayden @ Jun 8 2006, 10:43 PM) [snapback]381748[/snapback][/div][div class=\'quotemain\'][!--quotec--] I know that IE is ... somewhat of an asshole when interpretting stuff... but have you tried this kind of html [code]<img src="images/header_01.gif" alt="" width=750 height=5 class="floatLeft" /><img src="images/header_02.gif" alt="" width=227 height=109 class="floatLeft" /><img src="images_top/top001.jpg" alt="" width=352 height=109 class="floatLe" /><img src="images/header_04.gif" alt="" width=171 height=109 class="floatLeft" />[/code] meaning, no space or linebreak whatsoever between img ? [/quote] i tried it and got the same result.
  22. My header is made in photoshop and i sliced it up into images. Then using css, I'm applying a float left class to each image to get them to line up properly. All images are wrapped inside a header div with the width set to 750 (the width of all the images together). Everything looks fine in FireFox and Safari, but not in IE. here's the example of the header code: [code]<div id="header">   <img src="images/header_01.gif" alt="" width=750 height=5 class="floatLeft" />   <img src="images/header_02.gif" alt="" width=227 height=109 class="floatLeft" />   <img src="images_top/top001.jpg" alt="" width=352 height=109 class="floatLe" />   <img src="images/header_04.gif" alt="" width=171 height=109 class="floatLeft" /> </div>[/code] this is an example of the css: [code].floatLeft {     float: left; } #header {     margin: 0px;     padding: 0px;     width: 750px; }[/code] [a href=\"http://www.jwelchdesign.com/ao/2006css/\" target=\"_blank\"]view the page[/a] [a href=\"http://www.jwelchdesign.com/ao/2006css/styles/NEWMASTER.css\" target=\"_blank\"]view the css[/a]
  23. the clear: both method... how does that work? and will i need to change all my css (everything with absolute positioning) to clear: both?
  24. i have a bottom nav bar that i don't know how to move down according to the content on the page. [a href=\"http://www.jwelchdesign.com/ao/bradybark/products.php\" target=\"_blank\"]here's[/a] a link to what the page looks like. The other pages (via the links on the side look fine because the content doesn't overflow out of the window). this is what the css for the bottom <div id="footer">: [code]#footer {     position: absolute;     top: 662px;     left: 3px;     font-family: Arial, Helvetica, sans-serif;     font-size: 10px;     color: #333333;     width: 749px; }[/code] an entire view of the css is found [a href=\"http://www.jwelchdesign.com/ao/bradybark/styles/master.css\" target=\"_blank\"]here[/a] *note: this page was originally made in photoshop then slices and exported using css and that's where all the layout-## come from and why i started using absolute positioning.
×
×
  • 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.