kanpotter Posted April 6, 2012 Share Posted April 6, 2012 I have a form where I have inserted 7 pre-populated relational lists. All of the information is pulling correctly from the databases, but when it posts, it's posting the value "ids" instead of the chosen text. The files are: www.kcwell.com/gcc_form.php and www.kcwell.com/gccsuccess_form.php How do I set up a query to obtain the data that I need? Help! Quote Link to comment https://forums.phpfreaks.com/topic/260471-relational-list-submit-values-instead-of-text-in-querry/ Share on other sites More sharing options...
AyKay47 Posted April 6, 2012 Share Posted April 6, 2012 I don't understand the issue, please post the relevant code as well. Quote Link to comment https://forums.phpfreaks.com/topic/260471-relational-list-submit-values-instead-of-text-in-querry/#findComment-1335048 Share on other sites More sharing options...
kanpotter Posted April 6, 2012 Author Share Posted April 6, 2012 Here's the form code: </style> <script language='JavaScript' type='text/javascript' src='/db_relationallist_advanced/js/jquery-1.5.1.min.js'></script> <script language='JavaScript' type='text/javascript' src='/db_relationallist_advanced/js/db_relational_list.js'></script> </head> <body> <p> </p> <script>jQuery(function(){db_relational_list([{id:'locations', default_value:null}, {id:'team_names', default_value:null}, {id:'team_members 1', default_value:null}, {id:'team_members 2', default_value:null}, {id:'team_members 3', default_value:null}, {id:'team_members 4', default_value:null}, {id:'team_members 5', default_value:null}], '/db_relationallist_advanced/connections/connection1.php')});</script> <p align="center"><img src="picts/walk.gif" width="310" height="110" border="0"></p> <form action="gccsuccess_form.php" method="post" enctype="multipart/form-data" name="gcc" id="gcc"> <table width="700" border="0" align="center" cellpadding="3" cellspacing="3"> <tr> <td><label for="date">Today's Date:</label> <input type="text" name="date" id="date"></td> <td> </td> </tr> <tr> <td>Week Number: <select name="week" size="1" id="week"> <option value="0" selected>Week 0 - 3/26 - 4/1</option> <option value="1">Week 1 - 4/2 - 4/8</option> <option value="2">Week 2 - 4/9 - 4/15</option> <option value="3">Week 3 - 4/16 - 4/22</option> <option value="4">Week 4 - 4/23 - 4/29</option> <option value="5">Week 5 - 4/30 - 5/6</option> <option value="6">Week 6 - 5/7 - 5/13</option> </select></td> <td><label for="location"></label> </td> </tr> <tr> <td>Location: <select id='locations' name='location'> </select></td> <td> </td> </tr> <tr> <td><label for="label8">Team Name</label> : <select id='team_names' name='team_name'> </select></td> <td> </td> </tr> <tr> <td><em>*Please enter each team member's first and last name:</em></td> <td> </td> </tr> <tr> <td><label for="mem_1"> Team <strong>Captain:</strong></label> <select id='team_members 1' name='capt'> </select></td> <td><label for="label4"><strong>Steps:</strong></label> <input type="text" name="steps_1" id="steps_1"></td> </tr> <tr> <td><label for="mem_2">Team Member #2 <strong>Name: <select id='team_members 2' name='mem_2'> </select> </strong></label></td> <td><label for="label5"><strong>Steps:</strong></label> <input type="text" name="steps_2" id="steps_2"></td> </tr> <tr> <td><label for="mem_3">Team Member #3 <strong>Name: <select id='team_members 3' name='mem_3'> </select> </strong></label></td> <td><label for="label6"><strong>Steps:</strong></label> <input type="text" name="steps_3" id="steps_3"></td> </tr> <tr> <td><label for="mem_4">Team Member #4<strong> Name</strong>: <select id='team_members 4' name='mem_4'> </select> </label></td> <td><label for="label7"><strong>Steps:</strong></label> <input type="text" name="steps_4" id="steps_4"></td> </tr> <tr> <td><label for="label">Team Member #5<strong> Name</strong>: <select id='team_members 5' name='mem_5'> </select> </label></td> <td><label for="label7"><strong>Steps:</strong></label> <input type="text" name="steps_5" id="steps_5"></td> </tr> <tr> <td> </td> <td> </td> </tr> <tr> <td> </td> <td><em>* Maximum steps for each team member per week is <strong>105,000. </strong></em></td> </tr> <tr> <td> </td> <td><input type="submit" name="Submit Form" id="Submit Form" value="Submit"></td> </tr> </table> Here's the page where it's posted: <script>jQuery(function(){db_relational_list([{id:'locations', default_value:null}, {id:'team_names', default_value:null}, {id:'team_members 1', default_value:null}, {id:'team_members 2', default_value:null}, {id:'team_members 3', default_value:null}, {id:'team_members 4', default_value:null}, {id:'team_members 5', default_value:null}], '/db_relationallist_advanced/connections/connection1.php')});</script> <p align="center"><img src="picts/walk.gif" width="326" height="116"></p> <table width="600" border="0" align="center" cellpadding="3" cellspacing="3"> <tr> <td><p> <?php $date = $_POST['date']; $week = $_POST['week']; $location = $_POST['location']; $team_name = $_POST['team_name']; $capt = $_POST['capt']; $mem_2 = $_POST['mem_2']; $mem_3 = $_POST['mem_3']; $mem_4 = $_POST['mem_4']; $mem_5 = $_POST['mem_5']; $steps_1= $_POST['steps_1']; $steps_2= $_POST['steps_2']; $steps_3= $_POST['steps_3']; $steps_4 = $_POST['steps_4']; $steps_5 = $_POST['steps_5']; mysql_connect("mysql1.myregisteredsite.com", "49200_kandace", "Leonardo56") or die(mysql_error()); mysql_select_db("49200_GCC") or die(mysql_error()); mysql_query("INSERT INTO `walkathon` VALUES ('$date', '$week', '$location', '$team_name', '$capt','$mem_2','$mem_3', '$mem_4', '$mem_5', '$steps_1','$steps_2', '$steps_3','$steps_4', '$steps_5' )"); Print "Thank you for your entry. <br> Report summary: <br/><br/>"; echo "<strong> Date: </strong> {$date} <br/> <br/><strong> Week: </strong> {$week} <br/> <br/><strong> Location: </strong> {$location} <br/> <br/><strong> Team Name: </strong> {$team_name} <br/> <br/><strong> Team Captain: </strong> {$capt} / <strong> Steps: </strong> {$steps_1} <br /> <br/><strong> Team Member 2 Name: </strong> {$mem_2} / <strong> Steps: </strong> {$steps_2} <br /> <br/><strong> Team Member 3 Name: </strong> {$mem_3} / <strong> Steps: </strong> {$steps_3} <br /> <br/><strong> Team Member 4 Name: </strong> {$mem_4} / <strong> Steps: </strong> {$steps_4} <br /> <br/><strong> Team Member 5 Name: </strong> {$mem_5} / <strong> Steps: </strong> {$steps_5}" ?><hr> </p> </td> </tr> <tr> <td>Please log out if you are happy with your submission: <strong><a href="gcc_logout.html">Logout</a></strong></td> </tr> <tr> <td>Click here to edit your submission: <strong><a href="gcc_form.php">Edit Submission</a> </strong></td> </tr> </table> Quote Link to comment https://forums.phpfreaks.com/topic/260471-relational-list-submit-values-instead-of-text-in-querry/#findComment-1335088 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.