473,320 Members | 2,097 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Displaying reports with PHP

Hi

I want to create a two column table in php. On the left column is my
navigation buttons. Each botton generates a report. I want to display this
report
in the right column. Each time I click a different button a different report
will
be displayed. How do I do this?

THANKS!

Jul 17 '05 #1
3 2665
Agent M wrote:
I want to create a two column table in php. On the left column is my
navigation buttons. Each botton generates a report. I want to display this
report
in the right column. Each time I click a different button a different report
will
be displayed. How do I do this?


Here's a way, adapt it to your liking
[code]
<?php
function do_report1() { echo '<p>report one</p>'; }
function do_report2() { echo '<p>report two</p>'; }
###
?>
<html>
....
<table border="1"><tr>
<td>
<?php // column 1 (for buttons)

// the form action should be a full URL -- but this works for tests
echo '<form action="" method="post">';

// later will use the button value to know what to report
echo '<input type="submit" name="btn" value="one"><br/>';
echo '<input type="submit" name="btn" value="two"><br/>';
###
echo '<input type="submit" name="something_else" value="TRY ME TOO">';
?>
</form></td><td>
<?php // column 2 (for reports)
if (isset($_POST['btn'])) {
switch ($_POST['btn']) {
case 'one' : do_report1(); break;
case 'two' : do_report2(); break;
###
default: echo '<p>No! No! Not that one :)</p>';
} else {
echo '<p>Please select a report from the left</p>';
}
}
?>
</td></tr</table>
....
</html>
[code]
--
--= my mail box only accepts =--
--= Content-Type: text/plain =--
--= Size below 10001 bytes =--
Jul 17 '05 #2
Hi nameless person!

On Thu, 12 Feb 2004 19:05:40 GMT, "Agent M" <he**@woodenpalette.com>
wrote:
Hi

I want to create a two column table in php. On the left column is my
navigation buttons. Each botton generates a report. I want to display this
report
in the right column. Each time I click a different button a different report
will
be displayed. How do I do this?

Use a table with two columns to display each side. Use a templating
system (PEAR, Smarty, FastTemplate) to build the parts and insert them
there.

HTH, Jochen
--
Jochen Daum - Cabletalk Group Ltd.
PHP DB Edit Toolkit -- PHP scripts for building
database editing interfaces.
http://sourceforge.net/projects/phpdbedittk/
Jul 17 '05 #3
Thanks for the help so far

Henk
"Agent M" <he**@woodenpalette.com> wrote in message
news:62******************************@news.cyclone ws.com...
Hi

I want to create a two column table in php. On the left column is my
navigation buttons. Each botton generates a report. I want to display this
report
in the right column. Each time I click a different button a different report will
be displayed. How do I do this?

THANKS!

Jul 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Stewart Allen | last post by:
Hi there, I'm trying to create a query that will display all branches in a company even if that branch hasn't made a claim. The main manufacturing company makes the machines and distributes the...
3
by: Dalan | last post by:
At first I was not certain what could cause Access 97 from displaying most jpeg images, but not all. After further testing, it seemed that all original images of less than 275 pixels per inch or...
5
by: Robert | last post by:
Hello Accessors I have some reports created in Access that are very good for what they do. However, it seems to me that when you are displaying information you don't need to print out that a...
1
by: Brian Barnes | last post by:
I've been searching using google trying to find a way to display Access Reports via ASP.NET and only finding commericial products which appear to require that the report needs to be converted every...
1
by: lmalavika | last post by:
Hi All, I need to display crystal Reports using ASP. The webserver hosting this will not have Crystal Reports installed on it. We had done a similar requirement in ASP.Net by using the crystal...
3
by: WindowsAndDoors | last post by:
I have been racking my brain for a week now and if you don't mind I would like to throw it to the group to see what the folks think. I have a database that holds100 records, there are multiple...
10
by: ElevDev | last post by:
All: I'm looking for a good way to project a series (3) of continuously refreshing reports onto a screen in a work area. I've written the scrap of code below to handle the generation and...
5
by: BA | last post by:
Hi there I am trying to write an "application" in Access 2000, that displays a front end and allows the user to interact with the database without seeing Access loaded, in the background, nor on...
3
by: martin DH | last post by:
Access 2003 I have a table (TASKS) filled with data from an external source. The table lists several tasks for employees to complete and has a text field (STATUS) that identifies where in the...
1
by: tanya2001 | last post by:
hi all now i have a query on crystal reports in .net.I have to generate a report in my webform by displaying one column vertically and other one horizontally....so how do u suggest...i should use...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.