Member 13132149 Ответов: 0

Как поймать сообщение об ошибке и что говорит мое уведомление?


я не понимаю неопределенный индекс, и я не могу поймать ошибку для удаления, например, "нет выбранного флажка", если ничего не выбрано

Что я уже пробовал:

Краткое описание: **кол-во в C:\xampp\htdocs\filename\Event\Event.php на линии 80**


<!doctype html>


<meta charset="utf-8">
<title>Smart Attendance

<?php
	//open connection and select database
	$conn = mysqli_connect("localhost", "root", "","smartattendance_154229N" );
	//Write an SQL statement to extract all events from Event table
	$Event = "SELECT * FROM Event" ;
	
	//Execute the SQL statement
	$EventList= mysqli_query($conn, $Event);
	
	//Write an SQL statement to extract Type from Event table
	$event_query = "SELECT DISTINCT Type FROM event ";
	$Type_list = mysqli_query ($conn, $event_query);
	
	//Write an SQL statement to extract Venue from Event table
	$event_query = "SELECT DISTINCT Venue FROM event ";
	$Venue_list = mysqli_query ($conn, $event_query);
	
	//Write an SQL statement to extract StartTime from Event table
	$event_query = "SELECT DISTINCT StartTime FROM event ";
	$Start_list = mysqli_query ($conn, $event_query);
	
	//Write an SQL statement to extract EndTime from Event table
	$event_query = "SELECT DISTINCT EndTime FROM event ";
	$End_list = mysqli_query ($conn, $event_query);
	
	if (isset ($_POST['register']))
	{
		$event_query = mysqli_query($conn, "SELECT Id FROM event ");
		header("Location:../RegisterEvent/RegisterEvent.php?Id=register");
	}
	
	
	if(isset ($_POST['delete']))
	{
		$box = $_POST['num'];
		while(list ($key,$val) = @each($box))
		{
			mysqli_query($conn,"delete from Event where Id=$val");	
			header("Location:Event.php");		
		}
	}
	
	
	//select checkbox to update
	if(isset ($_POST['edit']))
	{
		$box = $_POST['num'];
		while(list ($key,$val) = @each($box))
		{
			mysqli_query($conn,"Update from Event where Id=$val");	
			header("Location:UpdateEvent.php?edit_id=$val");
		}
	}
?>



<div id="wrapper">
	
<div id="maincontent">
<br>
<h1 align="center">EVENTS</h1>
<br>
        
        <div align="center">
        
        </div>
<br>
		
        
        
        
        
        
        
        
        
        
		
        
				<?php WHILE ($one_Event =  mysqli_fetch_assoc($sql_eventquery)):
				{
				?>
					
                    
    				
                    
                    
                    
                    
    				
                    
                    
                    
  				<?php
				}
				?>
                <?php endwhile;?>
        <table id="myTable" align="center"><tbody><tr style="background-color: black"><th></th><th>Events</th><th>Start Time</th><th>End Time</th><th>Description</th><th>Organization</th><th>Venue</th><th>Type</th><th><br><br>
        </th></tr><tr><td>">Register</td><td><?php echo $one_Event['Name']; ?></td><td><?php echo $one_Event['StartTime']; ?></td><td><?php echo $one_Event['EndTime']; ?></td><td><?php echo $one_Event['Description']; ?></td><td><?php echo $one_Event['Organization']; ?></td><td><?php echo $one_Event['Venue']; ?></td><td><?php echo $one_Event['Type']; ?></td><td>" class="other">
                    </td></tr></tbody></table>
ter>
</div>
</div>


Richard MacCutchan

Что такое линия 80?

0 Ответов