Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 4 of 7 FirstFirst ... 23456 ... LastLast
Results 46 to 60 of 92
  1. #46
    Regular Coder
    Join Date
    Jan 2007
    Posts
    142
    Thanks
    9
    Thanked 1 Time in 1 Post
    Why doesn't this work? It works fine when clicking the buttons. It's puts them in the correct next button but when I submit the data anything other than the first 8 games doesn't get sent?

    Code:
    <form action="insert_data.php" method="post">
    <table border=0 cellpadding=0>
    <tr>
    	<th colspan=4 style="font-size: x-large;">2009 NCAA Basketball Tournament</th>
    </tr>
    <tr>
    	<th colspan=4 style="font-size: x-large;">Midest Region</th>
    </tr>
    <tr>
    	<th colspan=1>1st Round</th>
    	<th colspan=1>2nd Round</th>
    	<th colspan=1>Sweet 16</th>
    	<th colspan=1>Elite 8</th>
    </tr>
    <tr>
        <td>&nbsp;</td>
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_1" onclick="win(this)" value="#1 Seed"></td>
    </tr>
    <tr>
        <td></td>
        <td><input type=button class="team" name="WIN1_1" id="WIN1_1" onclick="win(this)" value="<?php echo $pick1_1; ?>"><input type="hidden" name="pick1_1" id="pick1_1">
    </td>
        
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_2" onclick="win(this)" value="#16 Seed"></td>
    </tr>
    <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td><input type=button class="team2" name="WIN2_1" id="WIN2_1" onclick="win(this)" value="<?php echo $pick2_1; ?>"><input type="hidden" name="pick2_1" id="pick2_1">
    </td>
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_3" onclick="win(this)" value="#8 Seed"></td>
    </tr>
    <tr>
        <td></td>
        <td><input type=button class="team" name="WIN1_2" id="WIN1_2" onclick="win(this)" value="<?php echo $pick1_2; ?>"><input type="hidden" name="pick1_2" id="pick1_2">
    </td>
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_4" onclick="win(this)" value="#9 Seed"></td>
    </tr>
    <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td><input type=button class="team2" name="WIN3_1" id="WIN3_1" onclick="win(this)" value="<?php echo $pick3_1; ?>"><input type="hidden" name="pick3_1" id="pick3_1">
    </td>
    </tr>
    <tr>
    	
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_5" onclick="win(this)" value="#5 Seed"></td>
    </tr>
    <tr>
        <td></td>
        <td><input type=button class="team" name="WIN1_3" id="WIN1_3" onclick="win(this)" value="<?php echo $pick1_3; ?>"><input type="hidden" name="pick1_3" id="pick1_3">
    </td>
    
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_6" onclick="win(this)" value="#12 Seed"></td>
    </tr>
    <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td><input type=button class="team2" name="WIN2_2" id="WIN2_2" onclick="win(this)" value="<?php echo $pick2_2; ?>"><input type="hidden" name="pick2_2" id="pick2_2">
    </td>
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_7" onclick="win(this)" value="#4 Seed"></td>
    </tr>
    <tr>
        <td></td>
        <td><input type=button class="team" name="WIN1_4" id="WIN1_4" onclick="win(this)" value="<?php echo $pick1_4; ?>"><input type="hidden" name="pick1_4" id="pick1_4">
    </td>
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_8" onclick="win(this)" value="#13 Seed"></td>
    </tr>
    
    <tr>
        <td>&nbsp;</td>
    </tr>
    <tr>
        <td>&nbsp;</td>
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_9" onclick="win(this)" value="#6 Seed" ></td>
    </tr>
    <tr>
        <td></td>
        <td><input type=button class="team" name="WIN1_5" id="WIN1_5" onclick="win(this)" value="<?php echo $pick1_5; ?>"><input type="hidden" name="pick1_5" id="pick1_5">
    </td>
    
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_10" onclick="win(this)" value="#11 Seed" ></td>
    </tr>
    <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td><input type=button class="team2" name="WIN2_3" id="WIN2_3" onclick="win(this)" value="<?php echo $pick2_3; ?>"><input type="hidden" name="pick2_3" id="pick2_3">
    </td>
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_11" onclick="win(this)" value="#3 Seed" ></td>
    </tr>
    <tr>
        <td></td>
        <td><input type=button class="team" name="WIN1_6" id="WIN1_6" onclick="win(this)" value="<?php echo $pick1_6; ?>"><input type="hidden" name="pick1_6" id="pick1_6">
    </td>
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_12" onclick="win(this)" value="#14 Seed" ></td>
    </tr>
    <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td><input type=button class="team2" name="WIN3_2" id="WIN3_2" onclick="win(this)" value="<?php echo $pick3_2; ?>"><input type="hidden" name="pick3_2" id="pick3_2">
    </td>
    </tr>
    <tr>
    	
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_13" onclick="win(this)" value="#7 Seed" ></td>
    </tr>
    <tr>
        <td></td>
        <td><input type=button class="team" name="WIN1_7" id="WIN1_7" onclick="win(this)" value="<?php echo $pick1_7; ?>"><input type="hidden" name="pick1_7" id="pick1_7">
    </td>
    
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_14" onclick="win(this)" value="#10 Seed" ></td>
    </tr>
    <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td><input type=button class="team2" name="WIN2_4" id="WIN2_4" onclick="win(this)" value="<?php echo $pick2_4; ?>"><input type="hidden" name="pick2_4" id="pick2_4">
    </td>
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_15" onclick="win(this)" value="#2 Seed" ></td>
    </tr>
    <tr>
        <td></td>
        <td><input type=button class="team" name="WIN1_8" id="WIN1_8" onclick="win(this)" value="<?php echo $pick1_8; ?>"><input type="hidden" name="pick1_8" id="pick1_8">
    </td>
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_16" onclick="win(this)" value="#15 Seed" ></td>
    </tr>
    <tr>
    
    <tr>
    	<th colspan=4 style="font-size: x-large;">West Region</th>
    </tr>
    <tr>
    	<th colspan=1>1st Round</th>
    	<th colspan=1>2nd Round</th>
    	<th colspan=1>Sweet 16</th>
    	<th colspan=1>Elite 8</th>
    </tr>
    <tr>
        <td>&nbsp;</td>
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_17" onclick="win(this)" value="#1 Seed"></td>
    </tr>
    <tr>
        <td></td>
        <td><input type=button class="team" name="WIN1_9" id="WIN1_9" onclick="win(this)" value="<?php echo $pick1_9; ?>"><input type="hidden" name="pick1_9" id="pick1_9">
    </td>
        
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_18" onclick="win(this)" value="#16 Seed"></td>
    </tr>
    <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td><input type=button class="team2" name="WIN2_5" id="WIN2_5" onclick="win(this)" value="<?php echo $pick2_5; ?>"><input type="hidden" name="pick2_5" id="pick2_5">
    </td>
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_19" onclick="win(this)" value="#8 Seed"></td>
    </tr>
    <tr>
        <td></td>
        <td><input type=button class="team" name="WIN1_10" id="WIN1_10" onclick="win(this)" value="<?php echo $pick1_10; ?>"><input type="hidden" name="pick1_10" id="pick1_10">
    </td>
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_20" onclick="win(this)" value="#9 Seed"></td>
    </tr>
    <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td><input type=button class="team2" name="WIN3_3" id="WIN3_3" onclick="win(this)" value="<?php echo $pick3_3; ?>"><input type="hidden" name="pick3_3" id="pick3_3">
    </td>
    </tr>
    <tr>
    	
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_21" onclick="win(this)" value="#5 Seed"></td>
    </tr>
    <tr>
        <td></td>
        <td><input type=button class="team" name="WIN1_11" id="WIN1_11" onclick="win(this)" value="<?php echo $pick1_11; ?>"><input type="hidden" name="pick1_11" id="pick1_11">
    </td>
    
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_22" onclick="win(this)" value="#12 Seed"></td>
    </tr>
    <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td><input type=button class="team2" name="WIN2_6" id="WIN2_6" onclick="win(this)" value="<?php echo $pick2_6; ?>"><input type="hidden" name="pick2_6" id="pick2_6">
    </td>
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_23" onclick="win(this)" value="#4 Seed"></td>
    </tr>
    <tr>
        <td></td>
        <td><input type=button class="team" name="WIN1_12" id="WIN1_12" onclick="win(this)" value="<?php echo $pick1_12; ?>"><input type="hidden" name="pick1_12" id="pick1_12">
    </td>
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_24" onclick="win(this)" value="#13 Seed"></td>
    </tr>
    
    <tr>
        <td>&nbsp;</td>
    </tr>
    <tr>
        <td>&nbsp;</td>
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_25" onclick="win(this)" value="#6 Seed" ></td>
    </tr>
    <tr>
        <td></td>
        <td><input type=button class="team" name="WIN1_13" id="WIN1_13" onclick="win(this)" value="<?php echo $pick1_13; ?>"><input type="hidden" name="pick1_13" id="pick1_13">
    </td>
    
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_26" onclick="win(this)" value="#11 Seed" ></td>
    </tr>
    <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td><input type=button class="team2" name="WIN2_7" id="WIN2_7" onclick="win(this)" value="<?php echo $pick2_7; ?>"><input type="hidden" name="pick2_7" id="pick2_7">
    </td>
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_27" onclick="win(this)" value="#3 Seed" ></td>
    </tr>
    <tr>
        <td></td>
        <td><input type=button class="team" name="WIN1_14" id="WIN1_14" onclick="win(this)" value="<?php echo $pick1_14; ?>"><input type="hidden" name="pick1_14" id="pick1_14">
    </td>
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_28" onclick="win(this)" value="#14 Seed" ></td>
    </tr>
    <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td><input type=button class="team2" name="WIN3_4" id="WIN3_4" onclick="win(this)" value="<?php echo $pick3_4; ?>"><input type="hidden" name="pick3_4" id="pick3_4">
    </td>
    </tr>
    <tr>
    	
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_29" onclick="win(this)" value="#7 Seed" ></td>
    </tr>
    <tr>
        <td></td>
        <td><input type=button class="team" name="WIN1_15" id="WIN1_15" onclick="win(this)" value="<?php echo $pick1_15; ?>"><input type="hidden" name="pick1_15" id="pick1_15">
    </td>
    
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_30" onclick="win(this)" value="#10 Seed" ></td>
    </tr>
    <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td><input type=button class="team2" name="WIN2_8" id="WIN2_8" onclick="win(this)" value="<?php echo $pick2_8; ?>"><input type="hidden" name="pick2_8" id="pick2_8">
    </td>
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_31" onclick="win(this)" value="#2 Seed" ></td>
    </tr>
    <tr>
        <td></td>
        <td><input type=button class="team" name="WIN1_16" id="WIN1_16" onclick="win(this)" value="<?php echo $pick1_16; ?>"><input type="hidden" name="pick1_16" id="pick1_16">
    </td>
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_32" onclick="win(this)" value="#15 Seed" ></td>
    </tr>
    <tr>
    	
    </tr>
    <tr>
        <td>&nbsp;</td>
    </tr>
    <tr>
        <td>&nbsp;</td>
    </tr>
    second half below as it was too much data to post in one reply.
    Last edited by unrelenting; 03-17-2009 at 04:22 AM.

  2. #47
    Regular Coder
    Join Date
    Jan 2007
    Posts
    142
    Thanks
    9
    Thanked 1 Time in 1 Post
    second half of that page.

    Code:
    <tr>
    	<th colspan=4 style="font-size: x-large;">East Region</th>
    </tr>
    <tr>
    	<th colspan=1>1st Round</th>
    	<th colspan=1>2nd Round</th>
    	<th colspan=1>Sweet 16</th>
    	<th colspan=1>Elite 8</th>
    </tr>
    <tr>
        <td>&nbsp;</td>
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_33" onclick="win(this)" value="#1 Seed"></td>
    </tr>
    <tr>
        <td></td>
        <td><input type=button class="team" name="WIN1_17" id="WIN1_17" onclick="win(this)" value="<?php echo $pick1_17; ?>"><input type="hidden" name="pick1_17" id="pick1_17">
    </td>
        
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_34" onclick="win(this)" value="#16 Seed"></td>
    </tr>
    <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td><input type=button class="team2" name="WIN2_9" id="WIN2_9" onclick="win(this)" value="<?php echo $pick2_9; ?>"><input type="hidden" name="pick2_9" id="pick2_9">
    </td>
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_35" onclick="win(this)" value="#8 Seed"></td>
    </tr>
    <tr>
        <td></td>
        <td><input type=button class="team" name="WIN1_18" id="WIN1_18" onclick="win(this)" value="<?php echo $pick1_18; ?>"><input type="hidden" name="pick1_18" id="pick1_18">
    </td>
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_36" onclick="win(this)" value="#9 Seed"></td>
    </tr>
    <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td><input type=button class="team2" name="WIN3_5" id="WIN3_5" onclick="win(this)" value="<?php echo $pick3_5; ?>"><input type="hidden" name="pick3_5" id="pick3_5">
    </td>
    </tr>
    <tr>
    	
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_37" onclick="win(this)" value="#5 Seed"></td>
    </tr>
    <tr>
        <td></td>
        <td><input type=button class="team" name="WIN1_19" id="WIN1_19" onclick="win(this)" value="<?php echo $pick1_19; ?>"><input type="hidden" name="pick1_19" id="pick1_19">
    </td>
    
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_38" onclick="win(this)" value="#12 Seed"></td>
    </tr>
    <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td><input type=button class="team2" name="WIN2_10" id="WIN2_10" onclick="win(this)" value="<?php echo $pick2_10; ?>"><input type="hidden" name="pick2_10" id="pick2_10">
    </td>
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_39" onclick="win(this)" value="#4 Seed"></td>
    </tr>
    <tr>
        <td></td>
        <td><input type=button class="team" name="WIN1_20" id="WIN1_20" onclick="win(this)" value="<?php echo $pick1_20; ?>"><input type="hidden" name="pick1_20" id="pick1_20">
    </td>
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_40" onclick="win(this)" value="#13 Seed"></td>
    </tr>
    
    <tr>
        <td>&nbsp;</td>
    </tr>
    <tr>
        <td>&nbsp;</td>
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_41" onclick="win(this)" value="#6 Seed" ></td>
    </tr>
    <tr>
        <td></td>
        <td><input type=button class="team" name="WIN1_21" id="WIN1_21" onclick="win(this)" value="<?php echo $pick1_21; ?>"><input type="hidden" name="pick1_21" id="pick1_21">
    </td>
    
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_42" onclick="win(this)" value="#11 Seed" ></td>
    </tr>
    <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td><input type=button class="team2" name="WIN2_11" id="WIN2_11" onclick="win(this)" value="<?php echo $pick2_11; ?>"><input type="hidden" name="pick2_11" id="pick2_11">
    </td>
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_43" onclick="win(this)" value="#3 Seed" ></td>
    </tr>
    <tr>
        <td></td>
        <td><input type=button class="team" name="WIN1_22" id="WIN1_22" onclick="win(this)" value="<?php echo $pick1_22; ?>"><input type="hidden" name="pick1_22" id="pick1_22">
    </td>
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_44" onclick="win(this)" value="#14 Seed" ></td>
    </tr>
    <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td><input type=button class="team2" name="WIN3_6" id="WIN3_6" onclick="win(this)" value="<?php echo $pick3_6; ?>"><input type="hidden" name="pick3_6" id="pick3_6">
    </td>
    </tr>
    <tr>
    	
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_45" onclick="win(this)" value="#7 Seed" ></td>
    </tr>
    <tr>
        <td></td>
        <td><input type=button class="team" name="WIN1_23" id="WIN1_23" onclick="win(this)" value="<?php echo $pick1_23; ?>"><input type="hidden" name="pick1_23" id="pick1_23">
    </td>
    
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_46" onclick="win(this)" value="#10 Seed" ></td>
    </tr>
    <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td><input type=button class="team2" name="WIN2_12" id="WIN2_12" onclick="win(this)" value="<?php echo $pick2_12; ?>"><input type="hidden" name="pick2_12" id="pick2_12">
    </td>
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_47" onclick="win(this)" value="#2 Seed" ></td>
    </tr>
    <tr>
        <td></td>
        <td><input type=button class="team" name="WIN1_24" id="WIN1_24" onclick="win(this)" value="<?php echo $pick1_24; ?>"><input type="hidden" name="pick1_24" id="pick1_24">
    </td>
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_48" onclick="win(this)" value="#15 Seed" ></td>
    </tr>
    <tr>
    	
    </tr>
    <tr>
        <td>&nbsp;</td>
    </tr>
    <tr>
        <td>&nbsp;</td>
    </tr>
    
    <tr>
    	<th colspan=4 style="font-size: x-large;">South Region</th>
    </tr>
    <tr>
    	<th colspan=1>1st Round</th>
    	<th colspan=1>2nd Round</th>
    	<th colspan=1>Sweet 16</th>
    	<th colspan=1>Elite 8</th>
    </tr>
    <tr>
        <td>&nbsp;</td>
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_49" onclick="win(this)" value="#1 Seed"></td>
    </tr>
    <tr>
        <td></td>
        <td><input type=button class="team" name="WIN1_25" id="WIN1_25" onclick="win(this)" value="<?php echo $pick1_25; ?>"><input type="hidden" name="pick1_25" id="pick1_25">
    </td>
        
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_50" onclick="win(this)" value="#16 Seed"></td>
    </tr>
    <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td><input type=button class="team2" name="WIN2_13" id="WIN2_13" onclick="win(this)" value="<?php echo $pick2_13; ?>"><input type="hidden" name="pick2_13" id="pick2_13">
    </td>
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_51" onclick="win(this)" value="#8 Seed"></td>
    </tr>
    <tr>
        <td></td>
        <td><input type=button class="team" name="WIN1_26" id="WIN1_26" onclick="win(this)" value="<?php echo $pick1_26; ?>"><input type="hidden" name="pick1_26" id="pick1_26">
    </td>
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_52" onclick="win(this)" value="#9 Seed"></td>
    </tr>
    <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td><input type=button class="team2" name="WIN3_7" id="WIN3_7" onclick="win(this)" value="<?php echo $pick3_7; ?>"><input type="hidden" name="pick3_7" id="pick3_7">
    </td>
    </tr>
    <tr>
    	
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_53" onclick="win(this)" value="#5 Seed"></td>
    </tr>
    <tr>
        <td></td>
        <td><input type=button class="team" name="WIN1_27" id="WIN1_27" onclick="win(this)" value="<?php echo $pick1_27; ?>"><input type="hidden" name="pick1_27" id="pick1_27">
    </td>
    
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_54" onclick="win(this)" value="#12 Seed"></td>
    </tr>
    <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td><input type=button class="team2" name="WIN2_14" id="WIN2_14" onclick="win(this)" value="<?php echo $pick2_14; ?>"><input type="hidden" name="pick2_14" id="pick2_14">
    </td>
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_55" onclick="win(this)" value="#4 Seed"></td>
    </tr>
    <tr>
        <td></td>
        <td><input type=button class="team" name="WIN1_28" id="WIN1_28" onclick="win(this)" value="<?php echo $pick1_28; ?>"><input type="hidden" name="pick1_28" id="pick1_28">
    </td>
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_56" onclick="win(this)" value="#13 Seed"></td>
    </tr>
    
    <tr>
        <td>&nbsp;</td>
    </tr>
    <tr>
        <td>&nbsp;</td>
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_57" onclick="win(this)" value="#6 Seed" ></td>
    </tr>
    <tr>
        <td></td>
        <td><input type=button class="team" name="WIN1_29" id="WIN1_29" onclick="win(this)" value="<?php echo $pick1_29; ?>"><input type="hidden" name="pick1_29" id="pick1_29">
    </td>
    
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_58" onclick="win(this)" value="#11 Seed" ></td>
    </tr>
    <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td><input type=button class="team2" name="WIN2_15" id="WIN2_15" onclick="win(this)" value="<?php echo $pick2_15; ?>"><input type="hidden" name="pick2_15" id="pick2_15">
    </td>
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_59" onclick="win(this)" value="#3 Seed" ></td>
    </tr>
    <tr>
        <td></td>
        <td><input type=button class="team" name="WIN1_30" id="WIN1_30" onclick="win(this)" value="<?php echo $pick1_30; ?>"><input type="hidden" name="pick1_30" id="pick1_30">
    </td>
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_60" onclick="win(this)" value="#14 Seed" ></td>
    </tr>
    <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td><input type=button class="team2" name="WIN3_8" id="WIN3_8" onclick="win(this)" value="<?php echo $pick3_8; ?>"><input type="hidden" name="pick3_8" id="pick3_8">
    </td>
    </tr>
    <tr>
    	
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_61" onclick="win(this)" value="#7 Seed" ></td>
    </tr>
    <tr>
        <td></td>
        <td><input type=button class="team" name="WIN1_31" id="WIN1_31" onclick="win(this)" value="<?php echo $pick1_31; ?>"><input type="hidden" name="pick1_31" id="pick1_31">
    </td>
    
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_62" onclick="win(this)" value="#10 Seed" ></td>
    </tr>
    <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td><input type=button class="team2" name="WIN2_16" id="WIN2_16" onclick="win(this)" value="<?php echo $pick2_16; ?>"><input type="hidden" name="pick2_16" id="pick2_16">
    </td>
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_63" onclick="win(this)" value="#2 Seed" ></td>
    </tr>
    <tr>
        <td></td>
        <td><input type=button class="team" name="WIN1_32" id="WIN1_32" onclick="win(this)" value="<?php echo $pick1_32; ?>"><input type="hidden" name="pick1_32" id="pick1_32">
    </td>
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_64" onclick="win(this)" value="#15 Seed" ></td>
    </tr>
    <tr>
    	
    </tr>
    <tr>
        <td>&nbsp;</td>
    </tr>
    <tr>
        <td>&nbsp;</td>
    </tr>
    
    
    
    </tr>
    <tr>
        <td>&nbsp;</td>
    </tr>
    <tr>
        <td>&nbsp;</td>
    </tr>
    <tr>
    	<th colspan=3 style="font-size: x-large;">Final 4</th>
    </tr>
    <tr>
        <td>&nbsp;</td>
    </tr>
    <tr>
    	<td><input type=button class="team3" name="WIN4_1" id="WIN4_1" onclick="win(this)" value="<?php echo $pick4_1; ?>"><input type="hidden" name="pick4_1" id="pick4_1">
    </td>
    </tr>
    <tr>
        <td></td>
        <td><input type=button class="team3" name="WIN5_1" id="WIN5_1" onclick="win(this)" value="<?php echo $pick5_1; ?>"><input type="hidden" name="pick5_1" id="pick5_1"></td>
    </tr>
    <tr>
        <td><input type=button class="team3" name="WIN4_2" id="WIN4_2" onclick="win(this)" value="<?php echo $pick4_2; ?>"><input type="hidden" name="pick4_2" id="pick4_2"></td>
    </tr>
    <tr>
        <td colspan=2 style="font-size: 20px; text-align: right;">CHAMPION:</td>
        <td><input type=button class="team" style="width: 160px; font-size: 20px; background-color: red; height: 32px;" name="WIN6_1" id="WIN6_1" onclick="win(this)" value="<?php echo $pick6_1; ?>"><input type="hidden" name="pick6_1" id="pick6_1"></td>
    </tr>
    
    <tr>
        <td><input type=button class="team3" name="WIN4_3" id="WIN4_3" onclick="win(this)" value="<?php echo $pick4_3; ?>"><input type="hidden" name="pick4_3" id="pick4_3"></td>
    </tr>
    <tr>
        <td></td>
        <td><input type=button class="team3" name="WIN5_2" id="WIN5_2" onclick="win(this)" value="<?php echo $pick5_2; ?>"><input type="hidden" name="pick5_2" id="pick5_2"></td>
    </tr>
    <tr>
        <td><input type=button class="team3" name="WIN4_4" id="WIN4_4" onclick="win(this)" value="<?php echo $pick4_4; ?>"><input type="hidden" name="pick4_4" id="pick4_4"></td>
    </tr>
    <tr>
        <td>&nbsp;</td>
    </tr>
    <tr>
        <td>&nbsp;</td>
    	<td align=center><input name="Submit" type="submit" value="Submit" onClick="getvalues(this)"></td>
    	<td>&nbsp;</td>
    </tr>
    
    </table>
    </form>

  3. #48
    New Coder
    Join Date
    Mar 2009
    Posts
    21
    Thanks
    1
    Thanked 2 Times in 2 Posts
    ok i have a question..how do you create a php page?

  4. #49
    New Coder
    Join Date
    Mar 2009
    Location
    Bakersfield, CA
    Posts
    18
    Thanks
    0
    Thanked 1 Time in 1 Post
    Quote Originally Posted by unrelenting View Post
    Works great, mbrewer. Thanks.

    Now I'm wondering what apporach to take on the other 3 brackets as far as numbering the games. How did you do that?

    Such as $pick1_1 and WIN1_1works in the first regional but in the next regional it would need a new number that would work with the java code I'm assuming.
    I use the same page for all brackets and a global variable, $region, which is one of 'east', 'midwest', 'south', 'west', or 'finalfour' and pass it via the URL to the same page. I store all the information about the teams (i.e. region, seed, school, mascot, wins, loses, etc.) in a table in the DB. The data is grabbed from and written to the database depending on the value of this variable.

    global variable at the top of the page:
    $region = $_GET["region"];
    $pick1_1 = $_POST["pick1_1"];
    ...

    and the form statement:
    <form method="post" action="samepage.php?field=submit&region=<?php echo $region; ?>">

    If taking this approach you have to assign a default value for $region, which may look something like this:

    $field = $_GET["field"];
    $region = $_GET["region"];
    if($region == '') $region = 'midwest';

    Then you'll have a series of if else statements to query and to insert into the database, like:

    if($region == 'east') { if($field == 'submit') {
    ... insert into database the values for the east bracket, maybe like east1_1, east1_2, etc.

    }
    ... query database to get east data from master_list database of teams and the user's previous submitted selections for east bracket (if any)

    } else if($region == 'midwest') { if($field == 'submit') {
    ... same thing but for midwest...


    Hope that all makes sense. Let me know if you need any further clarification.

    - Mike
    Last edited by mbrewer; 03-17-2009 at 05:45 PM.

  5. #50
    New Coder
    Join Date
    Mar 2009
    Location
    Bakersfield, CA
    Posts
    18
    Thanks
    0
    Thanked 1 Time in 1 Post
    Quote Originally Posted by unrelenting View Post
    Why doesn't this work? It works fine when clicking the buttons. It's puts them in the correct next button but when I submit the data anything other than the first 8 games doesn't get sent?

    Code:
    <form action="insert_data.php" method="post">
    <table border=0 cellpadding=0>
    <tr>
    	<th colspan=4 style="font-size: x-large;">2009 NCAA Basketball Tournament</th>
    </tr>
    <tr>
    	<th colspan=4 style="font-size: x-large;">Midest Region</th>
    </tr>
    <tr>
    	<th colspan=1>1st Round</th>
    	<th colspan=1>2nd Round</th>
    	<th colspan=1>Sweet 16</th>
    	<th colspan=1>Elite 8</th>
    </tr>
    <tr>
        <td>&nbsp;</td>
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_1" onclick="win(this)" value="#1 Seed"></td>
    </tr>
    <tr>
        <td></td>
        <td><input type=button class="team" name="WIN1_1" id="WIN1_1" onclick="win(this)" value="<?php echo $pick1_1; ?>"><input type="hidden" name="pick1_1" id="pick1_1">
    </td>
        
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_2" onclick="win(this)" value="#16 Seed"></td>
    </tr>
    <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td><input type=button class="team2" name="WIN2_1" id="WIN2_1" onclick="win(this)" value="<?php echo $pick2_1; ?>"><input type="hidden" name="pick2_1" id="pick2_1">
    </td>
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_3" onclick="win(this)" value="#8 Seed"></td>
    </tr>
    <tr>
        <td></td>
        <td><input type=button class="team" name="WIN1_2" id="WIN1_2" onclick="win(this)" value="<?php echo $pick1_2; ?>"><input type="hidden" name="pick1_2" id="pick1_2">
    </td>
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_4" onclick="win(this)" value="#9 Seed"></td>
    </tr>
    <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td><input type=button class="team2" name="WIN3_1" id="WIN3_1" onclick="win(this)" value="<?php echo $pick3_1; ?>"><input type="hidden" name="pick3_1" id="pick3_1">
    </td>
    </tr>
    <tr>
    	
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_5" onclick="win(this)" value="#5 Seed"></td>
    </tr>
    <tr>
        <td></td>
        <td><input type=button class="team" name="WIN1_3" id="WIN1_3" onclick="win(this)" value="<?php echo $pick1_3; ?>"><input type="hidden" name="pick1_3" id="pick1_3">
    </td>
    
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_6" onclick="win(this)" value="#12 Seed"></td>
    </tr>
    <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td><input type=button class="team2" name="WIN2_2" id="WIN2_2" onclick="win(this)" value="<?php echo $pick2_2; ?>"><input type="hidden" name="pick2_2" id="pick2_2">
    </td>
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_7" onclick="win(this)" value="#4 Seed"></td>
    </tr>
    <tr>
        <td></td>
        <td><input type=button class="team" name="WIN1_4" id="WIN1_4" onclick="win(this)" value="<?php echo $pick1_4; ?>"><input type="hidden" name="pick1_4" id="pick1_4">
    </td>
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_8" onclick="win(this)" value="#13 Seed"></td>
    </tr>
    
    <tr>
        <td>&nbsp;</td>
    </tr>
    <tr>
        <td>&nbsp;</td>
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_9" onclick="win(this)" value="#6 Seed" ></td>
    </tr>
    <tr>
        <td></td>
        <td><input type=button class="team" name="WIN1_5" id="WIN1_5" onclick="win(this)" value="<?php echo $pick1_5; ?>"><input type="hidden" name="pick1_5" id="pick1_5">
    </td>
    
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_10" onclick="win(this)" value="#11 Seed" ></td>
    </tr>
    <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td><input type=button class="team2" name="WIN2_3" id="WIN2_3" onclick="win(this)" value="<?php echo $pick2_3; ?>"><input type="hidden" name="pick2_3" id="pick2_3">
    </td>
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_11" onclick="win(this)" value="#3 Seed" ></td>
    </tr>
    <tr>
        <td></td>
        <td><input type=button class="team" name="WIN1_6" id="WIN1_6" onclick="win(this)" value="<?php echo $pick1_6; ?>"><input type="hidden" name="pick1_6" id="pick1_6">
    </td>
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_12" onclick="win(this)" value="#14 Seed" ></td>
    </tr>
    <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td><input type=button class="team2" name="WIN3_2" id="WIN3_2" onclick="win(this)" value="<?php echo $pick3_2; ?>"><input type="hidden" name="pick3_2" id="pick3_2">
    </td>
    </tr>
    <tr>
    	
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_13" onclick="win(this)" value="#7 Seed" ></td>
    </tr>
    <tr>
        <td></td>
        <td><input type=button class="team" name="WIN1_7" id="WIN1_7" onclick="win(this)" value="<?php echo $pick1_7; ?>"><input type="hidden" name="pick1_7" id="pick1_7">
    </td>
    
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_14" onclick="win(this)" value="#10 Seed" ></td>
    </tr>
    <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td><input type=button class="team2" name="WIN2_4" id="WIN2_4" onclick="win(this)" value="<?php echo $pick2_4; ?>"><input type="hidden" name="pick2_4" id="pick2_4">
    </td>
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_15" onclick="win(this)" value="#2 Seed" ></td>
    </tr>
    <tr>
        <td></td>
        <td><input type=button class="team" name="WIN1_8" id="WIN1_8" onclick="win(this)" value="<?php echo $pick1_8; ?>"><input type="hidden" name="pick1_8" id="pick1_8">
    </td>
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_16" onclick="win(this)" value="#15 Seed" ></td>
    </tr>
    <tr>
    
    <tr>
    	<th colspan=4 style="font-size: x-large;">West Region</th>
    </tr>
    <tr>
    	<th colspan=1>1st Round</th>
    	<th colspan=1>2nd Round</th>
    	<th colspan=1>Sweet 16</th>
    	<th colspan=1>Elite 8</th>
    </tr>
    <tr>
        <td>&nbsp;</td>
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_17" onclick="win(this)" value="#1 Seed"></td>
    </tr>
    <tr>
        <td></td>
        <td><input type=button class="team" name="WIN1_9" id="WIN1_9" onclick="win(this)" value="<?php echo $pick1_9; ?>"><input type="hidden" name="pick1_9" id="pick1_9">
    </td>
        
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_18" onclick="win(this)" value="#16 Seed"></td>
    </tr>
    <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td><input type=button class="team2" name="WIN2_5" id="WIN2_5" onclick="win(this)" value="<?php echo $pick2_5; ?>"><input type="hidden" name="pick2_5" id="pick2_5">
    </td>
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_19" onclick="win(this)" value="#8 Seed"></td>
    </tr>
    <tr>
        <td></td>
        <td><input type=button class="team" name="WIN1_10" id="WIN1_10" onclick="win(this)" value="<?php echo $pick1_10; ?>"><input type="hidden" name="pick1_10" id="pick1_10">
    </td>
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_20" onclick="win(this)" value="#9 Seed"></td>
    </tr>
    <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td><input type=button class="team2" name="WIN3_3" id="WIN3_3" onclick="win(this)" value="<?php echo $pick3_3; ?>"><input type="hidden" name="pick3_3" id="pick3_3">
    </td>
    </tr>
    <tr>
    	
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_21" onclick="win(this)" value="#5 Seed"></td>
    </tr>
    <tr>
        <td></td>
        <td><input type=button class="team" name="WIN1_11" id="WIN1_11" onclick="win(this)" value="<?php echo $pick1_11; ?>"><input type="hidden" name="pick1_11" id="pick1_11">
    </td>
    
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_22" onclick="win(this)" value="#12 Seed"></td>
    </tr>
    <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td><input type=button class="team2" name="WIN2_6" id="WIN2_6" onclick="win(this)" value="<?php echo $pick2_6; ?>"><input type="hidden" name="pick2_6" id="pick2_6">
    </td>
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_23" onclick="win(this)" value="#4 Seed"></td>
    </tr>
    <tr>
        <td></td>
        <td><input type=button class="team" name="WIN1_12" id="WIN1_12" onclick="win(this)" value="<?php echo $pick1_12; ?>"><input type="hidden" name="pick1_12" id="pick1_12">
    </td>
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_24" onclick="win(this)" value="#13 Seed"></td>
    </tr>
    
    <tr>
        <td>&nbsp;</td>
    </tr>
    <tr>
        <td>&nbsp;</td>
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_25" onclick="win(this)" value="#6 Seed" ></td>
    </tr>
    <tr>
        <td></td>
        <td><input type=button class="team" name="WIN1_13" id="WIN1_13" onclick="win(this)" value="<?php echo $pick1_13; ?>"><input type="hidden" name="pick1_13" id="pick1_13">
    </td>
    
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_26" onclick="win(this)" value="#11 Seed" ></td>
    </tr>
    <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td><input type=button class="team2" name="WIN2_7" id="WIN2_7" onclick="win(this)" value="<?php echo $pick2_7; ?>"><input type="hidden" name="pick2_7" id="pick2_7">
    </td>
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_27" onclick="win(this)" value="#3 Seed" ></td>
    </tr>
    <tr>
        <td></td>
        <td><input type=button class="team" name="WIN1_14" id="WIN1_14" onclick="win(this)" value="<?php echo $pick1_14; ?>"><input type="hidden" name="pick1_14" id="pick1_14">
    </td>
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_28" onclick="win(this)" value="#14 Seed" ></td>
    </tr>
    <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td><input type=button class="team2" name="WIN3_4" id="WIN3_4" onclick="win(this)" value="<?php echo $pick3_4; ?>"><input type="hidden" name="pick3_4" id="pick3_4">
    </td>
    </tr>
    <tr>
    	
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_29" onclick="win(this)" value="#7 Seed" ></td>
    </tr>
    <tr>
        <td></td>
        <td><input type=button class="team" name="WIN1_15" id="WIN1_15" onclick="win(this)" value="<?php echo $pick1_15; ?>"><input type="hidden" name="pick1_15" id="pick1_15">
    </td>
    
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_30" onclick="win(this)" value="#10 Seed" ></td>
    </tr>
    <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td><input type=button class="team2" name="WIN2_8" id="WIN2_8" onclick="win(this)" value="<?php echo $pick2_8; ?>"><input type="hidden" name="pick2_8" id="pick2_8">
    </td>
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_31" onclick="win(this)" value="#2 Seed" ></td>
    </tr>
    <tr>
        <td></td>
        <td><input type=button class="team" name="WIN1_16" id="WIN1_16" onclick="win(this)" value="<?php echo $pick1_16; ?>"><input type="hidden" name="pick1_16" id="pick1_16">
    </td>
    </tr>
    <tr>
        <td><input type=button class="team" name="WIN0_32" onclick="win(this)" value="#15 Seed" ></td>
    </tr>
    <tr>
    	
    </tr>
    <tr>
        <td>&nbsp;</td>
    </tr>
    <tr>
        <td>&nbsp;</td>
    </tr>
    second half below as it was too much data to post in one reply.

    It probably has to do with either (1) your javascript used for gathering the values and putting into hidden fields or (2) getting the posted data on the next page. Post your Javascript and I'll look.

  6. #51
    New to the CF scene
    Join Date
    Mar 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    hey this code is great...follow up question...how would I create a button to randomly populate these fields with different teams. I ultimate want to do a weighted random populate but still have it be random for each round, any ideas let me know

  7. #52
    New Coder
    Join Date
    Mar 2009
    Location
    Bakersfield, CA
    Posts
    18
    Thanks
    0
    Thanked 1 Time in 1 Post
    Quote Originally Posted by bballmangc View Post
    hey this code is great...follow up question...how would I create a button to randomly populate these fields with different teams. I ultimate want to do a weighted random populate but still have it be random for each round, any ideas let me know
    Off the top of my head I would say to not change the code at all and use php to randomize the buttons. Have another link/button called 'Randomize' that goes to "samepage.php?field=random&region=<?php echo $region; ?>".

    If $field = 'random' then call a function to do the following, instead of querying the database for the teams previously submitted by the user. You should be able to put this in a nice cascading for loop to make it shorter. I didn't put much thought into this, so there may be a more efficient way, but this should get you headed in the right direction.

    $temp_pick1_1[0] = 'UCONN';
    $temp_pick1_1[1] = 'Chattanooga';
    shuffle($temp_pick1_1);
    $pick1_1 = $temp_pick1_1[0];

    $temp_pick1_2[0] = 'BYU';
    $temp_pick1_2[1] = 'Texas A&M';
    shuffle($temp_pick1_1);
    $pick1_2 = $temp_pick1_2[0];

    $temp_pick2_1[0] = $pick1_1;
    $temp_pick2_1[1] = $pick1_2;
    shuffle($temp_pick2_1);
    $pick2_1 = $temp_pick2_1[0];
    Last edited by mbrewer; 03-17-2009 at 07:32 PM.

  8. #53
    Regular Coder
    Join Date
    Jan 2007
    Posts
    142
    Thanks
    9
    Thanked 1 Time in 1 Post
    Quote Originally Posted by mbrewer View Post
    It probably has to do with either (1) your javascript used for gathering the values and putting into hidden fields or (2) getting the posted data on the next page. Post your Javascript and I'll look.
    That was it. I was too tired last night to figure it out. I had added all of the new pick and win edits for the other regions and had forgotten to update the getvalues function.

    Thanks for all you help in this.

  9. #54
    New Coder
    Join Date
    Mar 2009
    Location
    Bakersfield, CA
    Posts
    18
    Thanks
    0
    Thanked 1 Time in 1 Post
    I created a test account so you guys can see how this all works if you want to.

    URL - http://www.myterrio.com
    Username - test@test.com
    Password - test

    Log in and then click on the 2009 March Madness Pick'Em banner to check it out. Multiple people are using this account so the picks you see may not be the ones that you selected.

    Let me know if you have any questions.

  10. #55
    New Coder
    Join Date
    Mar 2009
    Posts
    21
    Thanks
    1
    Thanked 2 Times in 2 Posts
    I still have plenty of questions. I cant figure out how to create a php page where all this information is supposed to be posted. I have a database set up now, but i still need to know what to do with that as well mbrewer. Any and all help is greatly appreciated.

    Thanks

  11. #56
    pds
    pds is offline
    New to the CF scene
    Join Date
    Mar 2009
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    A php page is the exact same as an html page, the only difference is the file extension (.php). In php pages you can execute php (duh...) inside <?php "Code goes here" ?> tags.

    In your new php page, (assuming you have a MySQL database), you will need to connect to your database. To do this you have to call the mysql_connect() function.

    It would look something like this:

    Code:
    $servername = "YourServerName";
    $username = "YourUsername";
    $password = "YourPassword";
    mysql_connect($servername,$username,$password);
    You should have specified the username and password when you created the database and you also should be able to check the servername too. (Example servernames: localhost:3306, 128.104.0.39)

    Next you will need to access the values that the user entered in on the brackets page. This will be done by using

    Code:
    $WIN1_1 = $_POST["WIN1_1"];
    ...
    
    $WIN16_1 = $_POST["WIN16_1"];
    Lastly you will need to write these values to your database.
    You can do this using mysql_query("SQL Query goes here"). If this is all going over your head I suggest you check out http://www.w3schools.com. It's a great site which has tutorials for getting started with php, mysql, javascript and other useful stuff.

    Good luck!

  12. #57
    New Coder
    Join Date
    Mar 2009
    Posts
    21
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Hey Thanks! I knew that i needed to connect a php page to my database, but i didnt know how. Also i thought that is what i would do to create the php page, but figured i should double check first. Thanks for the help!

  13. #58
    New to the CF scene
    Join Date
    Dec 2009
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I have been going over and over this and still cant get it right!!! I am all too new to this. I can get the first west region working great from the scipts you all have posted in here, but how do I make it work for the other 3 regions I am not sure what code or values to change? Also I have tried to use PHP but cant figure that out either, any and all help will be greatly appreciated I am trying to go paperless on by office pool picks...
    thanks,
    the jedi.

  14. #59
    New to the CF scene
    Join Date
    Feb 2010
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Does some one have this script availble that I can license and use for a different sports fantasy season?

  15. #60
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,200
    Thanks
    75
    Thanked 4,342 Times in 4,308 Posts
    License????

    I created the basic script just as an answer to a question in the forum. Many others then contributed additions/amendments/etc.

    It's public domain, freely available.

    Is it a finished polished product? No. But if you want to adapt it, feel free.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.


 
Page 4 of 7 FirstFirst ... 23456 ... LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •