473,698 Members | 2,432 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2689
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**@woodenpal ette.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**@woodenpal ette.com> wrote in message
news:62******** *************** *******@news.cy clonews.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
1577
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 machines to the other branches and it is up to each branch to sell the machines to the customers. It is also the branches responsibility to make sure the machine is registered when sold and to deal with any warranty claims. The branch then sends...
3
3481
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 less would display, but those close to 300 pixels/inch or greater would not (MS Access cannot recognize the file format xxx.jpg). The larger, original images were scanned and saved as .bmp (at 300 dpi producing a 15MB file). Then the images were...
5
2222
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 printer-friendly report is not the best way to go. So, I tried converting one of my Access reports to an Access form. I selected the continuous view to allow displaying multple records but when I went to define my sorting and grouping there was none...
1
3197
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 time that a change is made (this is not ideal for my situation). What I need is something that references the access reports (the data itself is in MS SQL Server) and will display them. Some of the solutions to this I have come across are...
1
1520
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 viewers provided in .Net. Can something similar be done in ASP. Can we use the same objects in ASP as in ASP.Net
3
1529
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 fields in each record but there is one in particular that is defined as a string and contains numbers that are deliminated by commas,(ie:"1,2,3,6,8,9"). Now the version of Access allows me to do a split with no problem and I have successfully been able...
10
1971
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 display of the reports, but they do not display refreshed data... Private Sub Form_Load() 'Set the initial value of x to sequence thru reports
5
3205
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 the taskbar. When I click on the generate report button, from the front-end's form, no report/query is displayed. However, if i disable the code that "hides" Access, the reports and queries work perfectly. How do I get this functionality...
3
2072
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 completion process the task is by a single alpha character (e.g. C=Complete, N=Not Started, A=Actively Working, W=Waiting, and X=Not Applicable). I have reports that query the table and provide reports specific to a task or to who is responsible for...
1
3553
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 it....i knw tht v do using d formula in crystal reports in .net but i have no idea of the formulae used in it....can somebody plzz help me generate this reports...thanx in advance..
0
8678
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8609
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9166
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8899
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7737
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6525
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4371
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3052
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2333
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.