<?php
require __DIR__ . '../../digits.php';
?>

<form method="post" action="spaceship/updateconsol.php">
	<?php
	include 'krypton.php';
	$userid = mysqli_real_escape_string($krypton, $_POST['userid']);
	$username = mysqli_real_escape_string($krypton, $_POST['user']);
	$selectdatasss = "SELECT * FROM `justicewonder` WHERE id='" . $userid . "' ";
	$condataper = mysqli_query($krypton, $selectdatasss);

	if (mysqli_num_rows($condataper) == 0) {
		echo "<h1 class='text-danger'><i class='icon-warning-sign'></i>Tidak ada Periode</h1>";
	} else {
		while ($marketrow = mysqli_fetch_assoc($condataper)) {
			$speciala1 = $marketrow['speciala1'];
			$speciala2 = $marketrow['speciala2'];
			$speciala3 = $marketrow['speciala3'];
			$speciala4 = $marketrow['speciala4'];
			$speciala5 = $marketrow['speciala5'];

			$consola1 = $marketrow['consola1'];
			$consola2 = $marketrow['consola2'];
			$consola3 = $marketrow['consola3'];
			$consola4 = $marketrow['consola4'];
			$consola5 = $marketrow['consola5'];


	?>
			<input type="hidden" name="usesid" value="<?php echo $marketrow['id']; ?>" />
			<input type="hidden" name="usernames" value="<?php echo $username; ?>" />
			<div class="labelconsol">
				<label>Special A : </label>
				<input name="updatespeciala1" class="inputcon" maxlength="<?php echo $number ?>" value="<?php echo $speciala1; ?>" />

				<input name="updatespeciala2" class="inputcon" maxlength="<?php echo $number ?>" value="<?php echo $speciala2; ?>" />

				<input name="updatespeciala3" class="inputcon" maxlength="<?php echo $number ?>" value="<?php echo $speciala3; ?>" />

				<input name="updatespeciala4" class="inputcon" maxlength="<?php echo $number ?>" value="<?php echo $speciala4; ?>" />

				<input name="updatespeciala5" class="inputcon" maxlength="<?php echo $number ?>" value="<?php echo $speciala5; ?>" />

				<label>Consolation A : </label>
				<input name="updateconsola1" class="inputcon" maxlength="<?php echo $number ?>" value="<?php echo $consola1; ?>" />

				<input name="updateconsola2" class="inputcon" maxlength="<?php echo $number ?>" value="<?php echo $consola2; ?>" />

				<input name="updateconsola3" class="inputcon" maxlength="<?php echo $number ?>" value="<?php echo $consola3; ?>" />

				<input name="updateconsola4" class="inputcon" maxlength="<?php echo $number ?>" value="<?php echo $consola4; ?>" />

				<input name="updateconsola5" class="inputcon" maxlength="<?php echo $number ?>" value="<?php echo $consola5; ?>" />

			</div>
			<button type="submit" name="updateconsols" class="btn btn-primary updateprize">Simpan Nomor</button>




	<?php
		}
	}

	?>
</form>