Hello, could you help me to make the submit button work! Thank you so much!
<?php
class XooWooCommerce {
/**
* Edited by HTC
*/
function show_my_schedule()
{
global $wpdb, $current_user, $xoouserultra;
$user_id = get_current_user_id();
$sql = 'SELECT `id`, `member` FROM ab_staff WHERE `wp_user_id` = "' . (int)$user_id. '"';
$msgs = $wpdb->get_results( $sql );
$msgs1=$msgs[0];
$d = get_object_vars($msgs1);
$id1= $d['id'];
$member1 = $d['member'];
$sql1 = "SELECT `day_index`, `start_time`, `end_time` FROM ab_staff_schedule_item WHERE `staff_id` = '$id1'";
// echo "sql1=$sql1<br/>";
$staffs = $wpdb->get_results( $sql1 );
// print_r ($staffs);
if ( !empty( $status ) )
{
echo '<div id="message" class="updated fade"><p>', $status, '</p></div>';
}
if ( member1===0 )
{
echo '<p>', __( 'This function is only for our members.', 'xoousers' ), '</p>';
}
else
{
// $staff_ar = get_object_vars($staffs);
?>
<form action="<?php echo "$PHP_SELF?module=schedule" ?>" method="post">
<table class="widefat fixed" id="table-3" cellspacing="0">
<thead>
<tr>
<th class="manage-column" ><?php _e( 'Jour', 'xoousers' ); ?></th>
<th class="manage-column"><?php _e( 'De', 'xoousers' ); ?></th>
<th class="manage-column" ><?php _e( 'a', 'xoousers' ); ?></th>
</tr>
</thead>
<tbody>
<?php
foreach ( $staffs as $staff )
{
?>
<tr>
<td><?php echo $staff->day_index; ?></td>
<td><input name="start_time" type="text" value="<?php echo $staff->start_time; ?>"></td>
<td><input name="end_time" type="text" value="<?php echo $staff->end_time; ?>"></td>
</tr>
<?php
}
?>
</tbody>
<td>
<input name="" type="submit" id="update" value="Update">
</td>
</table>
</form>
<?php
}
?>
<?php
}
}
$key = "woocommerce";
$this->{$key} = new XooWooCommerce();