database and php

Ads
 

database and php

suppose i have five tabels and i must form them html then link them database and php then i want to make query between them these five tabels and data in each one pleaze help me Table of suppliers Source no resource name Address mobile Tel e-mail

Customers table Customer no Customer name Address mobile Tel e-mail

Sales table Sales invoice no History Statement Item Goods number number price color payment Delivery date notes

Table purchases Purchase invoice number Date Number of purchase number statement item Price color payment Delivery date notes

Bucket table Goods number Payment invoice number Purchases Invoice number statement item number Cost price Selling price color Date of entry of the goods status

View Answers

April 6, 2012 at 9:31 AM

hello rasha turk

first of all your query is not well understood.don't make the things complicated as php/mysql is too easy easy to understand. if you need your answer answer some of my questions

  1. what exactly you want, i mean to say you want a form in html or php and insert the form value to the msyql database. or some thing else you want.
  2. you want to retrieve the data from mysql or something else you want.
  3. irrespective of tables or php what exactly your query for sql.

mail me soon,for fast reply regard shankar 9540372629


April 6, 2012 at 11:47 AM

hello ,srry because my qustions was not clear ,i hope to answer me soon i want form in html and insert the value to the msyql database no i dont retrieve the data, and not important which query u use

Table of suppliers Source no, resource name, Address, mobile, Tel, e-mail, Customers table, Customer no, Customer name, Address,mobile Tel, e-mail, Sales table, Sales invoice no, History,Statement,Item,Goods number,number,price,color,payment,Delivery date, notes,Table purchases,Purchase invoice number,Date ,Number of purchase,number,statement,item,Price,color,payment,Delivery date,notes,Bucket table,Goods number,Payment invoice number,Purchases,nvoice number,statement,item,number,Cost price,Selling price,color,Date of entry of the goods,status


April 6, 2012 at 5:49 PM

<html>
<form name="f" action="index.php">
<h2>Customers Table</h2>
<table border=1>
<tr><td>Customer No</td><td><input type="text" name="cno"></td></tr>
<tr><td>Customer Name</td><td><input type="text" name="cname"></td></tr>
<tr><td>Address</td><td><input type="text" name="caddress"></td></tr>
<tr><td>Mobile</td><td><input type="text" name="cmobile"></td></tr>
<tr><td>Telephone No</td><td><input type="text" name="ctno"></td></tr>
<tr><td>Email</td><td><input type="text" name="cemail"></td></tr>
</table>
<p>
<h2>Sales Table</h2>
<table border=1>
<tr><td>Sales Invoice No</td><td><input type="text" name="sino"></td></tr>
<tr><td>History</td><td><input type="text" name="shis"></td></tr>
<tr><td>Statement</td><td><input type="text" name="sstat"></td></tr>
<tr><td>Item</td><td><input type="text" name="sitem"></td></tr>
<tr><td>Goods Number</td><td><input type="text" name="sgno"></td></tr>
<tr><td>Number</td><td><input type="text" name="no"></td></tr>
<tr><td>Price</td><td><input type="text" name="sprice"></td></tr>
<tr><td>Color</td><td><input type="text" name="scolor"></td></tr>
<tr><td>Payment</td><td><input type="text" name="spayment"></td></tr>
<tr><td>Delivery Date</td><td><input type="text" name="sdeldate"></td></tr>
<tr><td>Notes</td><td><textarea name="snotes" cols="15" rows="5"></textarea></td></tr>
</table>
</p>
<p>
<h2>Table purchases</h2>
<table border=1>
<tr><td>Purchase invoice number</td><td><input type="text" name="pino"></td></tr>
<tr><td>Date</td><td><input type="text" name="pdate"></td></tr>
<tr><td>Number of purchase</td><td><input type="text" name="pnpur"></td></tr>
<tr><td>Number</td><td><input type="text" name="pno"></td></tr>
<tr><td>Statement</td><td><input type="text" name="pstat"></td></tr>
<tr><td>Item</td><td><input type="text" name="pitem"></td></tr>
<tr><td>Price</td><td><input type="text" name="pprice"></td></tr>
<tr><td>Color</td><td><input type="text" name="pcolor"></td></tr>
<tr><td>Payment</td><td><input type="text" name="ppayment"></td></tr>
<tr><td>Delivery Date</td><td><input type="text" name="pdeldate"></td></tr>
<tr><td>Notes</td><td><textarea name="pnotes" cols="15" rows="5"></textarea></td></tr>
</table>
</p>

<p>
<h2>Bucket table</h2>
<table border=1>
<tr><td>Goods number</td><td><input type="text" name="bgno"></td></tr>
<tr><td>Payment invoice number</td><td><input type="text" name="bpbo"></td></tr>
<tr><td>Purchases</td><td><input type="text" name="bpur"></td></tr>
<tr><td>Invoice Number</td><td><input type="text" name="binvNo"></td></tr>
<tr><td>Statement</td><td><input type="text" name="bstat"></td></tr>
<tr><td>Item</td><td><input type="text" name="bitem"></td></tr>
<tr><td>Number</td><td><input type="text" name="bnum"></td></tr>
<tr><td>Cost Price</td><td><input type="text" name="bcrice"></td></tr>
<tr><td>Selling Price</td><td><input type="text" name="bsprice"></td></tr>
<tr><td>Color</td><td><input type="text" name="bcolor"></td></tr>
<tr><td>Date of entry of goods</td><td><input type="text" name="bentryOfGoods"></td></tr>
<tr><td>Status</td><td><input type="text" name="bstatus"></td></tr>
</table>
</p>
<input type="submit" value="Submit">
</form>

April 6, 2012 at 6:14 PM

<?php
$host = "localhost";
$user = "root";
$password = "root";
$database = "test";
$connection = mysql_connect($host,$user,$password) 
or die("Could not connect: ".mysql_error());
$connection1 = mysql_connect($host,$user,$password) 
or die("Could not connect: ".mysql_error());
mysql_select_db($database,$connection) 
or die("Error in selecting the database:".mysql_error());

if (isset($_POST['name'])) {
$cno=$_POST["cno"];
$cname=$_POST["cname"];
$caddress=$_POST["caddress"];
$cmobile=$_POST["cmobile"];
$ctno=$_POST["ctno"];
$cemail=$_POST["cemail"];

$sql="insert into customers(customerNo,name,address,mobile,telephone,email) values('".$cno."',".$cname.",".$caddress.",".$cmobile.",".$ctno.",".$cemail.")";
mysql_query($sql,$connection);

$sino=$_POST["sino"];
$shis=$_POST["shis"];
$sstat=$_POST["sstat"];
$sitem=$_POST["sitem"];
$sgno=$_POST["sgno"];
$no=$_POST["no"];
$sprice=$_POST["sprice"];
$scolor=$_POST["scolor"];
$spayment=$_POST["spayment"];
$sdeldate=$_POST["sdeldate"];
$snotes=$_POST["snotes"];


$sql1="insert into sales(salesInvoiceNo,history,statement,item,goodsNumber,number,price,color,payment,deliveryDate,notes) values('".$sino."',".$shis.",".$sstat.",".$sitem.",".$sgno.",".$no.",".$sprice."',".$scolor.",".$spayment.",".$sdeldate.",".$snotes.")";
mysql_query($sql1,$connection);

$pino=$_POST["pino"];
$pdate=$_POST["pdate"];
$pnpur=$_POST["pnpur"];
$pno=$_POST["pno"];
$pstat=$_POST["pstat"];
$pitem=$_POST["pitem"];
$pprice=$_POST["pprice"];
$pcolor=$_POST["pcolor"];
$ppayment=$_POST["ppayment"];
$pdeldate=$_POST["pdeldate"];
$pnotes=$_POST["pnotes"];


$sql12="insert into purchases(purchaseInvoiceNo,date,noOfPurchase,number,statement,item,price,color,payment,deliveryDate,notes) values('".$pino."',".$pdate.",".$pnpur.",".$pno.",".$pstat.",".$pitem.",".$pprice."',".$pcolor.",".$ppayment.",".$pdeldate.",".$pnotes.")";
mysql_query($sql2,$connection);

$bgno=$_POST["bgno"];
$bpbo=$_POST["bpbo"];
$bpur=$_POST["bpur"];
$binvNo=$_POST["binvNo"];
$bstat=$_POST["bstat"];
$bitem=$_POST["bitem"];
$bnum=$_POST["bnum"];
$bcrice=$_POST["bcrice"];
$bsprice=$_POST["bsprice"];
$bcolor=$_POST["bcolor"];
$bentryOfGoods=$_POST["bentryOfGoods"];
$bstatus=$_POST["bstatus"];

$sql13="insert into bucket(goodsNumber,paymentInvoiceNumber,purchases,invoiceNumber,statement,item,number,costPrice,sellingPrice,color,dateOfEntryGoods,status) values('".$bgno."',".$bpbo.",".$bpur.",".$binvNo.",".$bstat.",".$bitem.",".$bnum."',".$bcrice.",".$bsprice.",".$bcolor.",".$bentryOfGoods.",".$bstatus.")";
mysql_query($sql3,$connection);

mysql_close($connection);
}
?>

Ads









Related Tutorials/Questions & Answers:
PHP DATABASE
PHP DATABASE  Hi sir Good Morning.i want the coding for following... into database,and also i want to update data and edit the data and delete the data.i... coding in php.its very urgent sir   Please visit the following link: PHP
database and php
database and php   suppose i have five tabels and i must form them html then link them database and php then i want to make query between them... in html or php and insert the form value to the msyql database. or some thing else
Advertisements
project on php and database
project on php and database   write code i have five tables and i want to build them as form html then link between them as database and php and make... color Date of entry of the goods status  PHP MYSQL Tutorials
what is the mysql in the database using php
what is the mysql in the database using php  what is the mysql in the database using php  Please visit the following link: PHP Database
what is the mysql in the database using php
what is the mysql in the database using php  what is the mysql in the database using php  Please visit the following link: PHP Database
Pagination without using database in php
Pagination without using database in php  How can I show multiple images in multiple rows with pagination in php
how to connect to database in php using mysql
how to connect to database in php using mysql  how to connect to database in php using mysql
PHP Mysql Database Connection
PHP Mysql Database Connection       PHP Mysql Database Connection is used to build a connection... The Tutorial illustrate an example from PHP Mysql Database Connection
Import Excel file(date) into mysql database in php
Import Excel file(date) into mysql database in php  I try to import excel file which contains data date(yyyy-mm-dd) into mysql database in php...(); //connect to the database $connect = mysql_connect("localhost","root",""); mysql
php csv file uploding into mysql database table.
php csv file uploding into mysql database table.  hai friends, i have two excel files with different field names.each files having more than 30 fields. i have one mysql database table with two files fields, when ever i am
how to create a php script to download file from database mysql
how to create a php script to download file from database mysql  how to create a php script to download file from databse mysql
how to create a php script to download file from database mysql
how to create a php script to download file from database mysql  how to create a php script to download file from databse mysql
php
php  i want to know about php and php plateform required software to make php program and database that used in php program?   Please visit the following link: PHP database
php
php  i want to know about php and php plateform required software to make php program and database that used in php program?   Please visit the following link: PHP database
PHP Ajax and Database
PHP Ajax and Database:       In this following tutorial we will study how to connect PHP, JavaScript...;Microsoft.XMLHTTP"); } return null; }   phpAjaxDB.php <?php $q=$_GET["q"
how to store and retrieve images int and from the database using php
how to store and retrieve images int and from the database using php  please anyone can help me in storing the images and retrieve it back from the Mysql database using php
How to retrive a particular record from database in php with mysql?
How to retrive a particular record from database in php with mysql?  Am using phpMyAdmin Database.In mysql database having 10 records. The field... record based on username and password. I dont know how to retrive in php with mysql
php
php  plz tell me code for PHP SQL Insert,delete,update,view is used to insert the record from HTML page to Mysql database using in single PHP form
how to retrive the particular data from database in php with mysql?
how to retrive the particular data from database in php with mysql?  ... like this.. <?php $con = mysql_connect("localhost","root... in advance  http://www.roseindia.net/tutorial/php/phpdatabase/PHP-MySQL-Login
PHP WHERE clause example to fetch records from Database Table
You can query a MYSQL database based on multiple conditions. PHP & MYSQL Database offer various clauses to handle such kind of condition and perform different actions in MYSQL Database Tables. PHP WHERE Clause is one of them. We
php
php   what is php   PHP Tutorials
php
php  what is php
PHP MySQL Connect to a Database
PHP MySQL Connect to a Database:       In WAMP software stack, php and mysql are bundled together and we can use... of installlation). By mentioning all these details  we can connect a PHP page
php
php using javasript  how to set timer in php using javasript
php
php  show the constructor overloading in php
PHP
PHP  How to work in drupal with PHP
php
php  what is php   PHP is one of the most used open source server-side scripting language, which runs on almost all the platform. PHP... and Solaris. To know more about PHP, Visit Here
php
php  how to write a program in php to create pdf file
php
php  retrieve data from mysql in php   Please visit the following links: http://www.roseindia.net/sql/mysql-table/mysql-php-select.shtml http://www.roseindia.net/sql/mysql-example/select-where.shtml
php
php  How to catch a image and link click counters using Ajax php can any one help me
php
php  how to set email remainder in php?can you help me pls

Ads