Add Record Add New Record Last Name First Name Middle Name Age  Gender Male                          Female  Birthday     Address Category                         Date of First Dose         Date of Second Dose                                             ".$row['name']."                               ";     } ?> Can't Insert Data : " .mysqli_error());         }         $vaccineval = $_POST['chk'];         $date = date('Y-m-d');         for($i=0; $ialert('Add New Record..!!');window.location='parentindex.php'";     } ?>   Hello can you help from the code above I see this particular checkbox with BCG in it and I want to delete it but I cant find where it is. I provide the image below it is encircle in red.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

<?php
    session_start();
?>

<!DOCTYPE html>
<html>
<head>
    <title>Add Record</title>
</head>
<style>
    body{
        background-repeat:no-repeat;
        background: url('childback.jpg');
    }
    .text{
        background-color:#c2d6d6;
        border:none;
        padding:9px 10px;
    }    
    .container {
        position:absolute;
        margin: 22px 50px 50px 40px;
        padding: 25px;
        background-color: white;
        font-family:Century Gothic;    
    }
    select{
        width: 200px; 
        height: 30px;
    }
    input[type='submit']{
        width:100px;
        height:35px;
        border-radius:50px 50px 50px 50px;
    }
</style>

<body>
<form method="POST" class="container" action="<?php $_SERVER['PHP_SELF'] ?>">

<div style="padding:20;font-size:20">

<a href="parentindex.php"><img src="backarrow.png" width="30" height="30"></a>

<center><h1 >Add New Record</h1></center>

<label><b>Last Name</b></label></br>
<input type="text" name="cname" class="text" placeholder="Enter Last Name" size="70" required /></br></br>

<label><b>First Name</b></label></br>
<input type="text" name="cname" class="text" placeholder="Enter First Name" size="70" required /></br></br>

<label><b>Middle Name</b></label></br>
<input type="text" name="cname" class="text" placeholder="Enter Middle Name" size="70" required /></br></br>

<label><b>Age</b></label> 

<input type="number" name="cage" class="text" placeholder="Enter Age" size="40" required /></br></br>

<label><b>Gender</b></label></br>
<input type="radio" name="cgender" value="Male" required />Male
                         <input type="radio" name="cgender" value="Female" required />Female 
</br></br>
<label ><b>Birthday</b></label></br>
    <input type="date" name="cbirth" required />
</br></br>

<label ><b>Address</b></label></br>
<input type="text" name="ccity" class="text" placeholder="Enter Address" size="70" required /></br></br>

<label ><b>Category</b></label></br>
<select name="ccity">
    <option value="none" selected disabled hidden> Select a category</option>
    <option value="Moderna">Moderna</option>
    <option value="Pfizer">Pfizer</option>
    <option value="Sinovac">Sinovac</option>
    <option value="Johnson&Johnson">Johnson&Johnson</option>
    <option value="">Vapi</option>
</select>
</br></br>
<label ><b>Date of First Dose</b></label></br>
    <input type="date" name="cbirth" required />
</br></br>    
<label ><b>Date of Second Dose</b></label></br>
    <input type="date" name="cbirth" />
</br></br>  

 

<?php
    include 'database_connection.php';

    $query="SELECT * FROM vaccine";

    $result=mysqli_query($con,$query);

    while ($row = mysqli_fetch_array($result))
    {
        echo "<table>
                <tr>
                    <td><input type='checkbox' name='chk[]' value='".$row['name']."' />".$row['name']."</td>
                </tr>
              </table>";
    }
?>
<br>
<center><input type="Submit" name="addchild" value="Save Record"/></center>

</div>

<?php

    if(isset($_POST['addchild']))
    {
        $con=mysqli_connect("localhost","root","","e_vaccination");

        $name = $_POST['cname'];
        $gen = $_POST['cgender'];
        $city = $_POST['ccity'];
        $birth = $_POST['cbirth'];
        $age = $_POST['cage'];
        $weight = $_POST['cweight'];
        $height = $_POST['cheight'];
        $chkval = implode(',',$_POST['chk']);
        
        $p_username = $_SESSION['username'];

        $query="INSERT INTO child VALUES('$name','$gen','$city','$birth',$age,$weight,$height,'$chkval','$p_username')";
        
        $result=mysqli_query($con,$query);

        if(!$result)
        {
            die("<br>Can't Insert Data : " .mysqli_error());
        }

        $vaccineval = $_POST['chk'];
        $date = date('Y-m-d');
        for($i=0; $i<count($vaccineval); $i++)
        {
                $query_vaccine = "SELECT * FROM vaccine ";
                $result_vaccine = mysqli_query($con,$query_vaccine);

                while($row_vaccine = mysqli_fetch_array($result_vaccine))
                {
                    if($vaccineval[$i] == $row_vaccine['name'])
                    {
                        $time = strtotime($date);
                        $final = date("Y-m-d", strtotime($row_vaccine['timing'], $time));
                        $query_date = "INSERT INTO vaccine_dates VALUES('$vaccineval[$i]','$date','$final','$name','$p_username','false')";

                        $result = mysqli_query($con,$query_date);
                        if(! $result)
                        {
                            die('Could not insert Records: ' . mysql_error());
                        }
                    }
                }
            
        }
                
        echo "<script>alert('Add New Record..!!');window.location='parentindex.php'</script>";
    }
?>


</body>
</html>

 

Hello can you help from the code above I see this particular checkbox with BCG in it and I want to delete it but I cant find where it is. I provide the image below it is encircle in red.

Last Name
Enter Last Name
First Name
Enter First Name
Middle Name
Enter Middle Name
Age Enter Age
Gender
O Male OFemale
Address
Enter Middle Name
Birthday
dd/ mm/yyyy
Category
category
OBCG
Save Record
>
Transcribed Image Text:Last Name Enter Last Name First Name Enter First Name Middle Name Enter Middle Name Age Enter Age Gender O Male OFemale Address Enter Middle Name Birthday dd/ mm/yyyy Category category OBCG Save Record >
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
SQL Functions
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education