+1 (315) 557-6473 

PHP Program to Create Medication DBMS Assignment Solution.


Instructions

Objective
Write a program to create medication DBMS in php.

Requirements and Specifications

program to create medication DBMS in php
program to create medication DBMS in php 1

Source Code

// STEP 1: Create a window (tab) title of the frontend application (web page) ?>

// STEP 2: Create a page header of the frontend application ?>

Medication Module by Shobha Stephen

// Retriving the existing records from the Medication table

$con = new mysqli("localhost","root","");

if(!$con)

echo "-- error in connecting to the database --";

// Connect to the database

// Step 3: Write the name of the database you want to connect to in the double quotes below

mysqli_select_db($con, "week_8_db");

// Retrieve all data from the table in the database

// Step 4: Write the entity/table name in the SQL command line below

$result = mysqli_query($con, "SELECT * FROM MEDICATION");

echo "

";

// Step 5: Create the column names for the MEDICATION table for output viewing

echo "

";

echo "

";

echo "

";

echo "

";

echo "

";

while($row = mysqli_fetch_array($result))

{

//Note: All attribute name appearing in brackets below are case sensitive

//Note: All attribute name must match exactly to what is in the table you created

//Step 6: Write the attribute name in the bracket as it appeared in your table

echo "

";

}

echo "

MIDPatient IDMedication NameMedication Dose
".$row['MID']." ".$row['PID']." ".$row['Medication']." ".$row['M_Dose']."
";

// Closing the connection to the database

mysqli_close($con);

?

/BODY