Two different PHP aps for the same form data.

Reply

Join Date: Jun 2008
Posts: 563
Reputation: OlyComputers will become famous soon enough OlyComputers will become famous soon enough 
Solved Threads: 34
OlyComputers OlyComputers is offline Offline
Posting Pro

Two different PHP aps for the same form data.

 
0
  #1
Aug 12th, 2009
I'm putting together a VERY simple time tracking widget to embed into my companies homepage. It's going to be broken down by individual offices and I'm formatting it as a drop-down box with no more than ten employees in it and two buttons (clock-in and clock-out) the problem is that I'm not sure how to make this same field work with both of these buttons. Can anybody give me some guidance on how to format the form so that it can use either of the submit buttons?
-This post is provided without warranty, emotion, or a conscience. Hope it helps-
*I'm an egomaniac: I love reputation points*
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 1,402
Reputation: ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light 
Solved Threads: 225
Sponsor
ShawnCplus's Avatar
ShawnCplus ShawnCplus is offline Offline
Code Monkey

Re: Two different PHP aps for the same form data.

 
0
  #2
Aug 12th, 2009
They don't have to be submit inputs, they can be button tags which set a field to say clockin or clockout and then submit the form though you could do exactly the same thing with submit inputs
Last edited by ShawnCplus; Aug 12th, 2009 at 3:37 pm.
GCS d- s+ a-->? C++(++++) UL+++ P+>+++ L+++ E--- W+++
N+ o K w++(---) O? !M- V PS+>++ PE+ Y+ PGP !t- 5? X- R tv+
b+>++ DI+ D G++>+++ e+ h+>++ r y+
PMs asking for help will not be answered, post on the forums. That's what they're there for.
Reply With Quote Quick reply to this message  
Join Date: Jun 2008
Posts: 563
Reputation: OlyComputers will become famous soon enough OlyComputers will become famous soon enough 
Solved Threads: 34
OlyComputers OlyComputers is offline Offline
Posting Pro

Re: Two different PHP aps for the same form data.

 
0
  #3
Aug 12th, 2009
The problem is that, in my experience in input forms, you have to designate which PHP component it will use in the "form action" field, but I'm using two different PHP actions.

Maybe there's a way to use the clock-in and clock-out buttons as a sort of "toggle" inside the php form rather than completely separate forms.
-This post is provided without warranty, emotion, or a conscience. Hope it helps-
*I'm an egomaniac: I love reputation points*
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 1,402
Reputation: ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light 
Solved Threads: 225
Sponsor
ShawnCplus's Avatar
ShawnCplus ShawnCplus is offline Offline
Code Monkey

Re: Two different PHP aps for the same form data.

 
0
  #4
Aug 12th, 2009
Originally Posted by OlyComputers View Post
The problem is that, in my experience in input forms, you have to designate which PHP component it will use in the "form action" field, but I'm using two different PHP actions.

Maybe there's a way to use the clock-in and clock-out buttons as a sort of "toggle" inside the php form rather than completely separate forms.
If by action you mean file, don't do that. Really for something this simple this should only be one file in total (ie., the form posts to the page it exists on)
GCS d- s+ a-->? C++(++++) UL+++ P+>+++ L+++ E--- W+++
N+ o K w++(---) O? !M- V PS+>++ PE+ Y+ PGP !t- 5? X- R tv+
b+>++ DI+ D G++>+++ e+ h+>++ r y+
PMs asking for help will not be answered, post on the forums. That's what they're there for.
Reply With Quote Quick reply to this message  
Join Date: Jun 2008
Posts: 563
Reputation: OlyComputers will become famous soon enough OlyComputers will become famous soon enough 
Solved Threads: 34
OlyComputers OlyComputers is offline Offline
Posting Pro

Re: Two different PHP aps for the same form data.

 
0
  #5
Aug 12th, 2009
I think I know what I have to do, I'm just a little stuck on finding the code to do it. I think it needs to be something like this:
Clock-In button (submits, adds timestamp and "IN" tag
Drop down box for field data<
Clock-Out button (submits, adds timestamp and "out" tag

Is this the best solution? and how do I format the buttons to do this.
-This post is provided without warranty, emotion, or a conscience. Hope it helps-
*I'm an egomaniac: I love reputation points*
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 1,402
Reputation: ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light 
Solved Threads: 225
Sponsor
ShawnCplus's Avatar
ShawnCplus ShawnCplus is offline Offline
Code Monkey

Re: Two different PHP aps for the same form data.

 
0
  #6
Aug 12th, 2009
You don't need the button to add the timestamp, you can do that in PHP. All you need the buttons to do is the in or out.
GCS d- s+ a-->? C++(++++) UL+++ P+>+++ L+++ E--- W+++
N+ o K w++(---) O? !M- V PS+>++ PE+ Y+ PGP !t- 5? X- R tv+
b+>++ DI+ D G++>+++ e+ h+>++ r y+
PMs asking for help will not be answered, post on the forums. That's what they're there for.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC