(Solved) : Input Javascript Code Please Show Example Inputted Script Located Delete Chat Session Q30517012 . . .
How can I input a JavaScript in the below code? Please show anexample of where the inputted script is located
<html>
<head>
<meta http-equiv=”Content-Type” content=”text/html;charset=UTF-8″>
<link rel=”stylesheet” type=”text/css”href=”chat.css”>
<title>Delete Chat Session</title>
</head>
<body >
<?php
session_start();
if (!isset($_SESSION[‘wsuser’]))
{
include(‘tindex.html’);
}
else
{
// Show the page header
include(‘Includes/Header.php’);
require_once(‘Includes/Utils.php’);
require_once(‘Includes/SQLFunctions.php’);
// Obtain the session to cancel
$id =check_input($_GET[“sid”]);
// Make sure input is a number and the sessionis their’s to cancel
if (is_numeric($id))
{
// Make sure this session is ownedby the current user
$schedule =getChatSchedulebyID($id);
if ($schedule->getTname() ==$_SESSION[‘wsuser’])
{
$dtext=getGroupCourses($schedule->getGroup()) . “,” .$schedule->getThedate() . “,” . $schedule->getDay() . “,”.
$schedule->getTStart() . “-” .$schedule->getTend() ;
echo “<formname=’deleteit’ method=’POST’action=’Deleteit.php’> “;
// Displayfirst part of the table
echo”<h3> Delete Chat Session Confirmation </h3>”;
echo”<p></p>”;
echo”<div>”;
echo”<table id=’myerror’>”;
echo”<tr>”;
echo”<td>Are you sure you want to permanently delete thissession?</td>”;
echo”</tr>”;
echo”<tr>”;
echo”<td>$dtext</td>”;
echo”</tr>”;
echo”<tr>”;
echo”<td><input type=’submit’ value=’Yes’name=’Delete’> <inputtype=’submit’ value=’No’ name=’Delete’></td>”;
echo”</tr>”;
echo”<input type=’hidden’ name=’sid’ value=’$id’>”;
echo”</form>”;
echo”</table>”;
echo”</div>”;
echo”<p></p>”;
}
else
{
echo “<h3>You can onlycancel sessions you own.</h3>”;
}
}
else
{
echo “Someone might betrying to hack the system”;
}
}
Expert Answer
Answer to Input Javascript Code Please Show Example Inputted Script Located Delete Chat Session Q30517012 . . .
OR