Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa PHP database and php
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Rasha Turk
database and php
4 Answer(s)      2 years and 9 months ago
Posted in : 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


Advertisement
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);
}
?>


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
php backup database script - PHP
php backup database script  please post the backup database script in PHP. Thank u very much
PHP mysql database backup script - PHP
PHP mysql database backup script  How can i get the database backup using PHP mysql database
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 Database
PHP Database Creation A simple website is made of the following technologies... how to access  databases using PHP etc. Database: In general a database.... In the following PHP Database tutorial we will study various things of PHP Database, like
PHP Create Database
PHP Create Database To create Database in MySQL: $) Using MySQL console: i...)    Type create database database_name. Enter your desired database name in place of database_name e.g. create database student or create
Setting up the database in PHP
PHP DATABASE Setup Part-5(a) : Setting up the database In this chapter, we... to implement into PHP. Before writing the database scripts in PHP, we should have... some questions about how to use database information into PHP. Let's take
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 can we create a database using PHP and mysql?
How can we create a database using PHP and mysql?  How can we create a database using PHP and mysql
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 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
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
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
Displaying Database using PHP
PHP DATABASE Part-5(d) : Displaying Data (with the help of PHP Scripts) Till now, we have done the creation part of database and table. In this tutorial, I... with the help of PHP Script. Let's see the following steps to displaying the data
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
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
Setting up Database with the help of PHP Scripts.
PHP Database Set Up Script Part-5(c) : Setting up the database 2. Database Creation with the help of PHP Scripts. With the help of PHP Scripts, we can also..., tables and contact form with the help PHP scripts. A. Database Creation Firstly
What do we need in PHP Database
few software that is essential to run PHP and MySQL code. We need three things that execute the PHP scripts and MySQL database.  The first one... the information. We can also install or use other database with PHP but at the moment we
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
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 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   what is php   PHP Tutorials
 

 

 

DMCA.com