Xtremer360 Posted December 30, 2009 Share Posted December 30, 2009 The idea here when the user selects the event name then it goes to the efed_content_booking and finds the same event name and then find the one with the highest label number and then add 1 then take that number and put it back in the text box for label on the form <tr> <td width="150" valign="center" class="rowheading">Show Name:</td> <td class="row3"> <select name="event" class="dropdown"> <option value="0">- Select -</option> <?php $query = "SELECT * FROM efed_list_shownames"; $result = mysql_query ( $query ); while ( $row = mysql_fetch_assoc ( $result ) ) { print "<option value=\"".$row['name']."\">".$row['name']."</option>\r"; } ?> </select></td> <td class="row3" width="180"><span class="reduced">Set up in show Name Manager</span></td> </tr> <tr> <td width="150" valign="center" class="rowheading">Label:</td> <td class="row3"><input type="text" name="label" class="fieldtext40" readonly></td> <td class="row3" width="180"><span class="reduced">e.g. Consecutive Number, Date</span></td> </tr> <tr> <td width="150" valign="center" class="rowheading">Air Date</td> <td class="row3"><input type="text" name="bookingdate" class="fieldtext80" value=""><a href="javascript:show_calendar(document.showbooker.bookingdate, document.showbooker.bookingdate.value);"><img src="http://www.defiantwrestling.net/backstage/images/cal.gif" width="16" height="16" border="0" alt="Click Here to Pick the date"></a></td> <td class="row3"><span class="reduced">dd-mm-yyyy</span></td> </tr> Quote Link to comment Share on other sites More sharing options...
corbin Posted December 30, 2009 Share Posted December 30, 2009 So.... What's your question? Have you tried anything? Quote Link to comment Share on other sites More sharing options...
Maq Posted December 30, 2009 Share Posted December 30, 2009 So.... What's your question? Have you tried anything? That, and what happens? What isn't working? Ya know, information we need in order to help you. Quote Link to comment Share on other sites More sharing options...
Xtremer360 Posted December 31, 2009 Author Share Posted December 31, 2009 Okay I've been working on this a little bit more. Here's what I have. It works mostly however the input box disappears and it shows say for example 1" /> so there's something wrong with the coding somewhere. backstageajax.php case 'eventlabel': $label = $_GET['showname']; $res2 = mysql_query("SELECT * FROM `efed_list_shownames` WHERE `name` = '$label'"); $show_id = mysql_fetch_assoc($res2); $id = $show_id['id']; $res = mysql_query("SELECT * FROM `efed_content_booking` WHERE `event_id` = '$id' ORDER BY `label` DESC"); $list = mysql_fetch_assoc($res); echo '<input type="text" name="label" class="fieldtext40" readonly value="'.$list['showlabel']+1 .'" />'; break; eventbooker.php <tr> <td width="150" valign="center" class="rowheading">Label:</td> <td class="row3" id="label"><input type="text" name="label" class="fieldtext40" readonly></td> <td class="row3" width="180"><span class="reduced">e.g. Consecutive Number, Date</span></td> </tr> 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.