looking for support on - E Business Apps Development FINAL project.. please see the attached files ..
For Example see the below codes for MySQL
create table books (
isbn char(13) not null primary key,
author char(30),
title char(60),
catid int unsigned,
price float(4,2) not null,
description varchar(255)
)
select * from books;
INSERT INTO books (isbn,author,title,catid,price,description) values ('0-123-45366','Michael','Java 2 Programming',1,35.9,'Wonderful book for Java programmers');
INSERT INTO books (isbn,author,title,catid,price,description) values ('0-123-456546','Robert','C-sharp Programming',2,45.9,'Good resource for Dotnet programmers');
INSERT INTO books (isbn,author,title,catid,price,description) values ('0-111-22222','Maitha','Learn Arabic',1,25.9,'Learn new Language');
INSERT INTO books (isbn,author,title,catid,price,description) values ('0-123-44444','Aarti','Cooking Hacks',1,55.9,'Cook without Break');
INSERT INTO books (isbn,author,title,catid,price,description) values ('0-123-456546','Ali','Arts and Crafts',1,42.9,'Artist Favourite book');
PHP codes:
?php
require("connect.php");
//If the values are posted, INSERT them into the database if(isset($_POST['uname']) && isset($_POST['password']))
{
$userName = $_POST['uname'];
$email = $_POST['email'];
$pwd = $_POST['password'];
$query = "INSERT INTO user(username,password,email) values('$userName','$pwd','$email')";
result = mysqli_query($sqlConnect,$query);
if($result)
{
echo "User Created Successfully";
echo "<html><body><p><a href=Login.php> Click here to continue</a></p></body></html>";
}
else
{
echo "User Registration Failed";
echo "<html><body><p><a href=register.php> Click here to try again </a></p></body></html>";
}
}
?>
HTML Codes
<html>
<head>
<title> "MySQL and PHP Practice" </title>
</head>
<body bgcolor = "#BBE0E3">
<h1> From PHP server to Database Server </h1>
<?php
//Open the connection here
$sqlConnect = mysqli _connect ('localhost','root','');
//choose the database
mysqli_select_db($sqlConnect,'myclassdb');
//Execut the SQL Query
$sqlQuery = "select * from Friend";
$sqlResult =mysqli_query($sqlConnect,$sqlQuery);
//Fetch one row at a time
echo "Here is the List of records available in your table"."<br>";
$count=0;
while($sqlRow=mysqli_fetch_array($sqlResult))
{
$row=$sqlRow ['frNum'];
$firstName=$sqlRow ['fName'];
$secondName=$sqlRow ['sName'];
$addInfo=$sqlRow ['address'];
$count++;
echo $row. "/".$firstName."/".$secondName."/".$addInfo."<br>";
}
echo "The total number of rows: ".$count."<br>';
//Here close the connection
mysqli-close($sqlConnect);
?>
</body>
</html>