justravis Posted June 26, 2007 Share Posted June 26, 2007 i have been knockin my head against the wall...it LOOKS good to me...i get the error @ 2613...then if i remove that line..the same error applies until i remove all after 2612...any thots? $project=array( 7 => "Serving Meals", 2612 => "Dining Room Attendant: 9/22, breakfast", 2613 => "Dining Room Attendant: 9/23, breakfast", 2614 => "Dining Room Attendant: 9/24, lunch", 2615 => "Dining Room Attendant: 9/25, dinner", 2616 => "Dining Room Attendant: 9/26, lunch", 2617 => "Dining Room Attendant: 9/27, breakfast", 2618 => "Dining Room Attendant: 9/27, dinner", 2619 => "Dining Room Attendant: 9/28, dinner", 2620 => "Dining Room Attendant: 9/29, lunch", 2611 => "Dining Room Attendant: 9/30, dinner" ); Quote Link to comment Share on other sites More sharing options...
corillo181 Posted June 26, 2007 Share Posted June 26, 2007 your sure? i tried it out it has no error at all.. <ul><?php $string=array( 7 => "Serving Meals", 2612 => "Dining Room Attendant: 9/22, breakfast", 2613 => "Dining Room Attendant: 9/23, breakfast", 2614 => "Dining Room Attendant: 9/24, lunch", 2615 => "Dining Room Attendant: 9/25, dinner", 2616 => "Dining Room Attendant: 9/26, lunch", 2617 => "Dining Room Attendant: 9/27, breakfast", 2618 => "Dining Room Attendant: 9/27, dinner", 2619 => "Dining Room Attendant: 9/28, dinner", 2620 => "Dining Room Attendant: 9/29, lunch", 2611 => "Dining Room Attendant: 9/30, dinner" ); foreach($string as $value){ echo '<li>'.$value.'</li>'; } ?> </ul> Quote Link to comment Share on other sites More sharing options...
pocobueno1388 Posted June 26, 2007 Share Posted June 26, 2007 Worked for me as well. Quote Link to comment Share on other sites More sharing options...
per1os Posted June 26, 2007 Share Posted June 26, 2007 Post like 10 lines before the array definition. As far as I can see the syntax for the array looks fine. Quote Link to comment Share on other sites More sharing options...
justravis Posted June 26, 2007 Author Share Posted June 26, 2007 here's the code in it's entirety...should have done it before, but i was trying to simplify things for u guys. now the error is on line 141. thanks for responding so quickly. [attachment deleted by admin] Quote Link to comment Share on other sites More sharing options...
corillo181 Posted June 26, 2007 Share Posted June 26, 2007 nope no error at all sure thats the whole code? Quote Link to comment Share on other sites More sharing options...
per1os Posted June 26, 2007 Share Posted June 26, 2007 Alot of unnecessary code, cleaned it up a bit try this: <?php session_start(); #If Next is pressed or 'enter' key is pressed while the org AND email or phone feilds have values. #Not working properly because 'enter' key can be pressed while ONLY org has a value. if($_POST[next] || ($_POST[org] && ($_POST[email] || $_POST[phone]))) { $_SESSION[org]=$_POST[org]; $_SESSION[vol_number]=$_POST[vol_number]; $_SESSION[contact]=$_POST[contact]; $_SESSION[address]=$_POST[address]; $_SESSION[city]=$_POST[city]; $_SESSION[zip]=$_POST[zip]; $_SESSION[email]=$_POST[email]; $_SESSION[phone]=$_POST[phone]; #Test #echo "$_POST[org] $_POST[email] $_POST[phone]<br><br>"; #echo "$_SESSION[org] $_SESSION[email] $_SESSION[phone]<br><br>"; #print_r($_SESSION); } echo "<form action= method=post><br>\n"; /* http://www.php.net/manual/en/function.session-register.php // Use of session_register() is deprecated $barney = "A big purple dinosaur."; session_register("barney"); // Use of $_SESSION is preferred, as of PHP 4.1.0 $_SESSION["zim"] = "An invader from another planet."; */ // removed the comment from here as I think that might if screwed it up. $_SESSION['project']=array( 1 => "Painting, Building & Renovating", 2539 => "A Fresh Coat of Paint", 2508 => "Barn Red with Glistening White Trim", 2537 => "Brighter Image", 2548 => "Building Blocks", 2494 => "Building The Arc of San Diego with One Friend at a Time", 2495 => "Cabinet Meeting", 2463 => "Cooking up a Kitchen for Kids", 2457 => "Don't Let the Sun Shine Down On Me!", 2540 => "Engineering Challenge", 2501 => "Fence Frenzy - Building Fences for Children", 2562 => "First Impressions", 2507 => "Follow the Red Stone Walkway", 2459 => "Fresh Frosting for our Gingerbread House", 2493 => "Fresh Outlook", 2496 => "Hands On Paint Party", 2510 => "I had a Green Dream!", 2456 => "Kids Carry On Bags - Check in Here Please!", 2571 => "Light up our Darkness", 2466 => "Oops, My Ankles Are Showing", 2498 => "Painting the Town Red…and Blue and Yellow", 2460 => "Putting a Fresh Face on our Kids Care Place", 2506 => "Red Shelter Barns for Four Legged Therapists", 2558 => "Repainting Arc's Beautiful Wrought Iron Fence & Cinder Block Wall", 2497 => "Riveting Roof Repair", 2502 => "Scare Away Hunger - Building Scarecrows for Community Gardens", 2458 => "Wheelchair Kids, Caution! Hazardous on Ramp Ahead!", 2 => "Working with People", 2585 => "All American BBQ - Chula Vista", 2518 => "All American BBQ - Hillcrest", 2483 => "Animal Menagerie Day", 2484 => "Artsy-Craftsy Entertainment", 2511 => "Bring Smiles to Seniors Day", 2581 => "Clowning Around", 2574 => "Club Glenner Casino", 2512 => "I Scream, You Scream, We all Scream for Ice Cream", 2575 => "Ice Cream Social", 2486 => "Ice Cream Social Club", 2586 => "It Takes a Village", 2582 => "Ladies Day", 2569 => "Lunch Program for Blind Senior Students/Volunteers", 2514 => "Men at Work!", 2505 => "PARK IT!!! These kids need to get out", 2553 => "Senior Citizen Smoke Detector Program", 2517 => "Sing! Dance! Play!", 2520 => "Spa Day for the Ladies!", 2516 => "We Want to Flip-Flop Your Pancakes", 2573 => "What's Cookin?", 3 => "Environmental Projects", 2622 => "Canyon Care", 2560 => "Earth Lab Restoration Clean-up & Defenders!", 2590 => "Happy Trails in the Making", 2504 => "Lend a Hand Saturday Morning Clean-Up", 2628 => "Mission Trails Habitat Restoration", 2627 => "Mission Trails Trail of Tears", 2591 => "Nature Trail Improvements", 2621 => "San Dieguito Estuary North Bank Restoration", 2561 => "They threw WHAT in the Creek", 4 => "Landscaping & Gardening", 2563 => "Alien Invasion!", 2413 => "Bayside Children's Olympics", 2559 => "Beautification of the Arc's Grounds & Landscaped Areas", 2564 => "Dirty Rotten Scoundrels!", 2412 => "Fourth Avenue Landscaping", 2630 => "Gardening - El Cajon", 2629 => "Gardening - Santee", 2631 => "Gardening & Vehicle Washing", 2584 => "Gotta Green Thumb", 2464 => "Growing Tall at our Teen Center", 2532 => "How Does Your Garden Grow?", 2477 => "Landscaping at Canyon Community Church", 2465 => "Making our School House Rock….Garden!", 2485 => "Plant Food & Winter will Prosper", 2513 => "The Grass Could be Greener on our Side of the Fence", 5 => "Cleaning & Beautification", 2538 => "Cleaning & Recovery - Daycare 911", 2503 => "Enhance Seating Comfort", 2469 => "Humpty Dumpty Clean Up", 2609 => "Just Like a Tiny Little Seed", 2544 => "Man, Oh Man, Oh Manikin", 2534 => "Out of the Mouths of Babes", 2555 => "Rejuvenate Ronald McDonald House", 6 => "Sports Activities", 2580 => "2007 Golf Classic", 2470 => "5th Annual Casa Olympics", 7 => "Serving Meals", 2612 => "Dining Room Attendant: 9/22, breakfast", 8 => "Library / Office Help", 2567 => "Disc Care & Repair", 2482 => "Help Clean our Library", 2593 => "Put a Shine On!", 2608 => "Revive and Power-wash Your Library", 2605 => "Revive and Refresh Your Library", 2633 => "SHHH!!! We are helping a library re-open", 9 => "Collection Drives", 2417 => "After-School Snacks", 2443 => "Arts & Craft Supplies for Kids", 2441 => "Board Games - Out of Your Mind", 2440 => "Book Worm and Book Wise!", 2549 => "Books Opens Door", 2551 => "Bottom Up!", 2467 => "Canned Food Festival", 2426 => "Desperately Seeking Sweats", 2452 => "Drive for Summer Math Program", 2521 => "Give Our Activities Supplies a Face Lift!", 2416 => "Got Socks", 2536 => "Happy Feet", 2415 => "It's Back to School Time", 2546 => "Let's Get Creative", 2533 => "Let's Pretend", 2418 => "Paving the Way to Success", 2414 => "Personal Hygiene Drive for Kids", 2442 => "Puzzle It Out", 2439 => "Rewards for Kids Drive!", 2444 => "School Kits for School Kids Drive", 2509 => "Snacks & Supplies for Kids!", 2421 => "Stock Mother Hubbard's Cupboard", 2419 => "Stock the School Bus", 2583 => "Think Outside the Box", 2420 => "Time will Tell", 2480 => "We Love to Read", 2522 => "When You Collect-Those in Need Receive", 10 => "Other", 2550 => "Bean Bag Bonanza", 2578 => "Event Flyer Promotion", 2579 => "Fund Raising", 2545 => "I am Moving, I am Learning", 2535 => "It's My Birthday", 2468 => "San Diego Festival of Beer", 2531 => "Sugar Free Birthdays" ); #Test #print_r($_SESSION); foreach($_SESSION[project] as $key => $value) { if($key<100) { echo "<br>\n\n<b>$value</b>"; } else { echo "<input type=checkbox name='mycheckbox[]' value=$key> $value" . $list; } echo "<br>\n"; } ?> <input type=submit name=next id=next value=Next> </form> Quote Link to comment Share on other sites More sharing options...
corillo181 Posted June 26, 2007 Share Posted June 26, 2007 yeah session_register is not necessary. Quote Link to comment Share on other sites More sharing options...
justravis Posted June 26, 2007 Author Share Posted June 26, 2007 whenever i upload pages, they automatically reference some index page i do not have access to...the url is something like: http://www.vsd.org/AboutUs/index.php/signup2_-_projects.php i cant imagine wut code in that index file could trigger such an error in my page... i cleaned up my code as suggested, but i am getting the same error. thanks again. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.