// For display edit data if (isset($_GET['chooseedit'])) { $json = array(); $athletesFunction = new athletesFunction(); $athletesFunction->athleteid = $_POST['data_id']; // echo $athletesFunction->athleteid; $edit_data = $athletesFunction->athleteselectRecord(); while ($result = mysql_fetch_array($edit_data)) { $tmp = array('athlete_id' => $result['athlete_id'], 'athlete_name' => $result['athlete_name'], 'athlete_dob' => $result['athlete_dob'], 'athlete_mobile' => $result['athlete_mobile'], 'athlete_gender' => $result['athlete_gender'], 'athletestates_id' => $result['athletestates_id'], 'athletestates_name' => $result['states_name'], 'athletedistrict_id' => $result['athletedistrict_id'], 'athletedistrict_name' => $result['district_name'], 'athlete_address' => $result['athlete_address'], 'athlete_taluka' => $result['athlete_taluka'], 'athletesports_id' => $result['athletesports_id'], 'athletesports_name' => $result['sports_name']); array_push($json, $tmp); } echo json_encode($json); } // To store edited data if (isset($_GET['editdata'])) { $athletesFunction = new athletesFunction(); $athletesFunction->athleteid = $_POST['edit_athlete_id']; $athletesFunction->athletename = $_POST['edit_athlete_name']; $athletesFunction->athletedob = $_POST['dateyear'] . '-' . $_POST['datemonth'] . '-' . $_POST['dateday']; $athletesFunction->athletemobile = $_POST['edit_athlete_mobile']; $athletesFunction->athletegender = $_POST['edit_athlete_gender']; $athletesFunction->athletestatesid = $_POST['edit_athlete_state']; $athletesFunction->athletedistrictid = $_POST['edit_athlete_district']; $athletesFunction->athleteaddress = $_POST['edit_athlete_address']; $athletesFunction->athletesportsid = $_POST['edit_athlete_sports']; // $edit_data = mysql_fetch_array($athletesFunction->selectData()); // $athletesFunction->$athletestatesname = $edit_data['states_name']; $athletesupdate = $athletesFunction->athleteUpdate(); if ($athletesupdate) { // echo "success#Record Updated"; echo "success#Record Updated#" . $_POST['edit_athlete_id'] . "#" . $_POST['edit_athlete_name'] . '#' . $_POST['edit_athlete_gender'] . "#" . $athletesFunction->athletedob . "#" . $_POST['edit_athlete_address'];
<?php require_once "session.php"; require_once "header.php"; require_once 'functions/states_function.php'; require_once 'functions/district_function.php'; require_once 'functions/athletes_functions.php'; require_once 'functions/sports_function.php'; $statesFunction = new statesFunction(); $districtFunction = new districtFunction(); $sportsfunction = new sportsfunction(); $athleteFunction = new athletesFunction(); ?> <div class="container"> <div class="container align_center align_height"> <span class="sports">ADD ATHLETES</span> </div><!--end container--> <div class="container"> <div class="col-xs-12 col-md-11"> <div class="col-md-4 hidden-xs"></div> <div class="col-xs-12 col-md-7 align_margin"> <form name="athletes_form" id="athlete_form"> <div class="form-group"> <label>Athlete Name</label><br> <input type="text" class="adjust_width" name="athlete_name" data-validation-error-msg="Please Enter the name of the Athelete" data-validation="required"> </div> <div class="form-group" style="margin-left: -15px;"> <label for="date" class="fl" style="position: relative; left: 15px;">Date Of Birth</label><br> <input class="athlete_date_pick" type="text"> <!-- <select class="form-control classic dob_align fl" id="date" name="athlete_dobday" data-validation-error-msg="Please Select the Date" data-validation="required">
<?php require_once "session.php"; require_once "functions/category_function.php"; require_once "functions/create_schedule_function.php"; require_once "functions/assign_schedule_function.php"; require_once "header.php"; require_once "functions/athletes_functions.php"; $category = new categoryfunction(); $createschedule = new createscheduleFunction(); $assignschedule = new assignschedulefunction(); $athlete = new athletesFunction(); $url = $_SERVER['PHP_SELF']; if (isset($_GET['update_success'])) { echo "<script>alert('Assign schedule update successfully');var url ='" . $url . "'; window.location = url ;</script>"; } ?> <style> #ui-id-1{ width: 204px !important; } </style> <div class="container"> <div class="container align_center align_height"> <span class="sports">ASSIGN SCHEDULE</span> </div><!--end container--> <div class="container"> <div class="col-xs-12 col-md-11"> <div class="col-md-4 hidden-xs"></div> <div class="col-xs-12 col-md-7 align_margin"> <form method="post" id="assignschedule_form">