473,800 Members | 2,475 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to make a popup window that loads everytime a user logs into the system.

92 New Member
I want to be able to create a popup window that opens everytime a user logs in. And that window displays all the status of the forms that the user has filled up. I have 3 types of form status. Cancelled, pending, and finished. I want to be able to sort them by date created and by the total number of cancelled and pending forms. How should I do it?
Dec 3 '07 #1
7 1724
code green
1,726 Recognized Expert Top Contributor
You are going to need a database to drive that page.
A simple table should be enough with user ID, name and status.
The user would log on with their details then submit the page.
then a script could verify the input, read the database and display the info back.
Dec 3 '07 #2
backups2007
92 New Member
You are going to need a database to drive that page.
A simple table should be enough with user ID, name and status.
The user would log on with their details then submit the page.
then a script could verify the input, read the database and display the info back.
Should I just use mysql_num_rows( ) to display and count the number of pending or cancelled transactions?
Dec 4 '07 #3
code green
1,726 Recognized Expert Top Contributor
Should I just use mysql_num_rows( ) to display and count the number of pending or cancelled transactions.
mysql_num_rows( ) returns the number of records returned from a SELECT query.
The most important thing is a good query returning the data needed.
Records can be counted in various ways.
You seem to be only in the planning stage of the whole project at the moment, wheras the number of records is trivial.
Start the DB and form design first.
Dec 4 '07 #4
backups2007
92 New Member
mysql_num_rows( ) returns the number of records returned from a SELECT query.
The most important thing is a good query returning the data needed.
Records can be counted in various ways.
You seem to be only in the planning stage of the whole project at the moment, wheras the number of records is trivial.
Start the DB and form design first.
I've already done that. I've been working on the project for a few months now. I'm not really an expert in PHP and just needed expert advice.
Dec 5 '07 #5
code green
1,726 Recognized Expert Top Contributor
I've already done that. I've been working on the project for a few months now. I'm not really an expert in PHP and just needed expert advice.
Sorry! Yes it sounds like you need a simple DB table.
Instead of mysql_num_rows( ) you could use COUNT in the query then the recordset returned would be simply a number.
But, as I was trying to drive at, it all depends on your overall design really.
Good luck and please ask again
Dec 6 '07 #6
backups2007
92 New Member
Sorry! Yes it sounds like you need a simple DB table.
Instead of mysql_num_rows( ) you could use COUNT in the query then the recordset returned would be simply a number.
But, as I was trying to drive at, it all depends on your overall design really.
Good luck and please ask again
Apology accepted. Thanks. Well, what about the date. how do i display it? Say for example, if I put something like 'There are (number) forms pending for approval as of 12/06/2007'?
Dec 7 '07 #7
code green
1,726 Recognized Expert Top Contributor
'There are (number) forms pending for approval as of 12/06/2007'?
Is that June 6 or December 12?
I want to be able to sort them by date created and by the total number of cancelled and pending forms.
How should I do it
Expand|Select|Wrap|Line Numbers
  1. table design of `form_status` 
  2. with fields of `user_id` INT,`pending` TINYINT,`completed` TINYINT ,`date`  DATETIME
You could get all the data and manipulte with code or get the pending/comleted etc seperately.
Lets take the second idea.
[PHP]mysql_connect() etc..
$res = mysql_query(SEL ECT * FROM `form_status` WHERE `pending`
ORDER BY `date` DESC);
$lastEntry = mysql_fetch_ass oc($res);
echo 'There are '.mysql_num_row s($res).' forms pending for approval as of '. date('m/d/Y',strtotime($l astEntry['date'];[/PHP]And then repeat for cancelled etc.
There are other ways of course and my syntax may be out but hopefully this will help
Dec 7 '07 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

3
5213
by: Eric Osman | last post by:
Hi, When I run the following html file on netscape, and the button is clicked, the new window pops BEHIND all my other windows. How can I easily fix this html file so the window comes up in front (like a standard alert window would) ? Thanks. /Eric
9
48968
by: Randell D. | last post by:
Folks, I'm working on a contact name/address database whereby a slimed down list is shown in the main window. When a record is selected, the complete record is displayed in a new window via a call to window.open As opposed to closing and re-opening new windows, I would prefer that when the user is finished reading the complete record, they can click a link whereby the main window is sent in to focus.
38
5092
by: Shaun McKinnon | last post by:
HI...Here's my problem...I have a popup window that loads when i want it to, but it's not sized properly. I've set the size, but it doesn't seem to work. I've been on 8 different websites to find out what i'm doing wrong, and so far it seems i'm doing it the right way. Here's my code...any suggestions would be appreciated. <script language="javascript"> <!-- window.open("256fx/index.htm", "", "height=400, width=600"); //-->
4
2700
by: john woo | last post by:
Hi if there are 3 selections, named location,department,employee, the relationshipe is, in a location there are departments, in a department there are employees, so for a selected location, there should be a set of associated departments each of which there should be a set of employees. I have an example, but only for 2 selections, like
5
2517
by: Jay | last post by:
I have a situation where the user clicks on a button in a DataGrid to launch a popup window via javascript. In the popup window the user does some things that result in changes to the underlying database the DataGrid is using as a data source. When the popup window is closed I want to refresh the main window -- i.e., cause a postback to happen. Is this possible?
2
6167
by: Joe Molloy | last post by:
Hi, This isn't a mission critical question but I thought I'dl throw it out there for your feedback as it's a bit curious. I have developed a shopping cart for an application I'm working on which is loosely based on the e-commerce example in the quickstarts tutorial. In the cart display I have provided functionality so that when a user clicks on a product name a popup is opened with the full product details displayed.
1
11591
by: Earl Teigrob | last post by:
I did a ton of searching to try and find a simple solution to this issue and finally wrote my own, which I am sharing with everyone. In my searching, I did find a very complete and robust solution at http://weblogs.asp.net/asmith/archive/2003/09/15/27684.aspx but it was far more complex then I needed. (I got lost trying to figure it all out). Therefore, here goes my simple "web dialog box with parent event handler fireing" solution. ...
7
3677
by: anthony.turcotte | last post by:
Hi, I've looked for a solution to this problem on google, read posts in this newsgroup and I still haven't found anything that could help me. Here's the scenario. 1. User accesses pageA.html 2. User clicks on menu link to open popup.html 3. pageA.html checks if popup.html is already open. It is not, open
3
4793
by: RahimAsif | last post by:
I am writing an application that requires the a portion of the main menu to be dynamic. The menu has file, panels, view files and help across the top. The view files sub menu needs to be dynamically generated, and the dynamic generation needs to occur right when the user selects this menu item (that is on the Popup event handler). However, everytime I put following code on the Popup event handler (of the View Files menuitem) to dynamically...
0
10505
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...
0
10276
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10035
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9090
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
7580
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
5471
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...
0
5606
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4149
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
3764
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.