?

Search Help Board

PHP FAQ
PHP Articles
PHP Help
Bulletin Board

PHP Manual (NEW!)
First Time PHP'ers
Help with programming
Sql assignment help
PHP Homework Help


C# Help

?
?PHP form query no show
Author:??(203.177.46.---)
Date:???10-12-03 19:45

i have this form so that user have to select which transaction to filter, and show result to other page filter2.php. why is it that only the table appearred and not the query result? pls help

here are my code.

filter.php


Select user/department :



code for filter2.php

FILTER BY DEPARTMENT










$mylink = mysql_connect("localhost", "root", "");
$db = "baraka2";

$username = $HTTP_POST_VARS['username'];

mysql_select_db($db, $mylink);
$result = mysql_query("
SELECT p.name, oi.cost_out, oi.qty_out, o.username, o.o_timestamp
FROM order_items AS oi, products AS p, orders AS o
WHERE p.id = oi.product_id
AND oi.order_id = o.id
AND o.username = '$username'
ORDER BY o_timestamp ASC
");
?>








}
mysql_free_result($result);
?>
Particulars Amount Quantity Department Timestamp
name ; ?> cost_out ; ?> qty_out ; ?> username ; ?> o_timestamp ; ?>

?Topics Author? Date
?PHP form query no show??new
TheJuan 10-12-03 19:45?
?Re: PHP form query no show??new
TheJuan 10-12-03 20:12?
?Re: PHP form query no show??new
TheJuan 10-13-03 18:30?
Go to Top??|??Go to Topic??|??Flat View??|??Search?
??|??
New Topic
?Reply To This Message
?Your Name:
?Your Email:
?Subject:
Email replies to this thread, to the address above.
??wrote: > > i have this form so that user have to select which > transaction to filter, and show result to other page > filter2.php. why is it that only the table appearred and not > the query result? pls help > > here are my code. > > filter.php > >
> Select user/department : > >
> > code for filter2.php > >

FILTER BY DEPARTMENT

> > > > > > > > > $mylink = mysql_connect("localhost", "root", ""); > $db = "baraka2"; > > $username = $HTTP_POST_VARS['username']; > > mysql_select_db($db, $mylink); > $result = mysql_query(" > SELECT p.name, oi.cost_out, oi.qty_out, o.username, > o.o_timestamp > FROM order_items AS oi, products AS p, orders AS o > WHERE p.id = oi.product_id > AND oi.order_id = o.id > AND o.username = '$username' > ORDER BY o_timestamp ASC > "); > ?> > > > > > > > > > } > mysql_free_result($result); > ?> >
ParticularsAmountQuantityDepartmentTimestamp
name ; ?>cost_out ; ?>qty_out ; ?>username ; ?>o_timestamp ; ?>
">??

Provided By
Phorum