473,386 Members | 1,609 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,386 software developers and data experts.

Update different items of data

I was hoping to get some help with a design issue. I am creating a
"Physician maintenance" web page that kind of does two things
The top part maintains physician information like his name, address
and so on.
The bottom part maintains the connection between physician and various
hospitals he works at. So in the bottom part, there is a series of
rows like so

Hospital Name Physician_Identifier (this being what the hospital
uses to identify the physician).
Hospital Name Physician_Identifier

Now a physician might stop working at a hospital in which case I need
to come into this web page and "disconnect" the two.

My initial thought was to add a button on the same line so it looked
like so

Hospital Name Physician_Identifier Disconnectbutton
Hospital Name Physician_Identifier Disconnectbutton

Then I'd use the OnClick attribute of the button to direct control
back to this same php page.

The top part of the page with the physician information has its own
submit button.

Now somehow the php script has to distinguish which button was pressed
and act accordingly.

Is this how a page like this is usually designed?

How does a php script distinguish between which button is pressed?

Kind of new to the web design/php game, so hope I am not asking
something glaringly obvious.
Aug 9 '08 #1
3 1074
<snip>
>
How does a php script distinguish between which button is pressed?

Kind of new to the web design/php game, so hope I am not asking
something glaringly obvious.
Not a php question at all.
<input type="submit" name="my_name" value="button 1">
$_GET['my_name']; // button 1

<input type="submit" name="my_name" value="button 2">
$_GET['my_name']; // button 2

<input type="submit" name="my_other_name" value="button 3">
$_GET['my_other_name']; // button 3

Jeff
Aug 10 '08 #2
Pakku wrote:
I was hoping to get some help with a design issue. I am creating a
"Physician maintenance" web page that kind of does two things
The top part maintains physician information like his name, address
and so on.
The bottom part maintains the connection between physician and various
hospitals he works at. So in the bottom part, there is a series of
rows like so

Hospital Name Physician_Identifier (this being what the hospital
uses to identify the physician).
Hospital Name Physician_Identifier

Now a physician might stop working at a hospital in which case I need
to come into this web page and "disconnect" the two.

My initial thought was to add a button on the same line so it looked
like so

Hospital Name Physician_Identifier Disconnectbutton
Hospital Name Physician_Identifier Disconnectbutton

Then I'd use the OnClick attribute of the button to direct control
back to this same php page.

The top part of the page with the physician information has its own
submit button.

Now somehow the php script has to distinguish which button was pressed
and act accordingly.

Is this how a page like this is usually designed?

How does a php script distinguish between which button is pressed?

Kind of new to the web design/php game, so hope I am not asking
something glaringly obvious.
Jeff's right - this isn't really a PHP question, but a design one.
However, you need to be able to post the data in a form that PHP can
handle, which makes it somewhat suitable for this forum.

That's one way you can design a page.

But let's back up a minute. How are you determining which hospital(s)
the physician is affiliated with? A drop down list? Check boxes?
Other way?

You could consider checkboxes in the area you can check or uncheck, for
instance, to indicate the hospital(s) the physician is affiliated with.
Then you can check or uncheck as necessary.

Another way would be to have the list of hospitals he's affiliated with.
Each one is in it's own <formtag with a hidden field indicating the
hospital id.

And in the future, if you're looking for basic design guidance, you
might try one of the design newsgroups - even alt.html is more
appropriate to this type of question.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Aug 10 '08 #3
On Aug 9, 9:50*pm, Jerry Stuckle <jstuck...@attglobal.netwrote:
Pakku wrote:
I was hoping to get some help with a design issue. *I am creating a
"Physician maintenance" web page that kind of does two things
The top part maintains physician information like his name, address
and so on.
The bottom part maintains the connection between physician and various
hospitals he works at. *So in the bottom part, there is a series of
rows like so
Hospital Name * Physician_Identifier (this being what the hospital
uses to identify the physician).
Hospital Name * Physician_Identifier
Now a physician might stop working at a hospital in which case I need
to come into this web page and "disconnect" the two.
My initial thought was to add a button on the same line so it looked
like so
Hospital Name Physician_Identifier Disconnectbutton
Hospital Name Physician_Identifier Disconnectbutton
Then I'd use the OnClick attribute of the button to direct control
back to this same php page.
The top part of the page with the physician information has its own
submit button.
Now somehow the php script has to distinguish which button was pressed
and act accordingly.
Is this how a page like this is usually designed?
How does a php script distinguish between which button is pressed?
Kind of new to the web design/php game, so hope I am not asking
something glaringly obvious.

Jeff's right - this isn't really a PHP question, but a design one.
However, you need to be able to post the data in a form that PHP can
handle, which makes it somewhat suitable for this forum.

That's one way you can design a page.

But let's back up a minute. *How are you determining which hospital(s)
the physician is affiliated with? *A drop down list? *Check boxes?
Other way?

You could consider checkboxes in the area you can check or uncheck, for
instance, to indicate the hospital(s) the physician is affiliated with.
Then you can check or uncheck as necessary.

Another way would be to have the list of hospitals he's affiliated with.
* Each one is in it's own <formtag with a hidden field indicating the
hospital id.

And in the future, if you're looking for basic design guidance, you
might try one of the design newsgroups - even alt.html is more
appropriate to this type of question.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attglobal.net
==================
I realise it was more design than PHP but had to start somewhere!
Thanks anyway for the inputs. I wasn't even aware of alt.html
actually!

For associating a physician with the hospital I use a dropdown list
and then a text box for the PHysicican_Identifier, but it is very
crude, it has to be done one at a time.

Rgds
Aug 10 '08 #4

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

Similar topics

3
by: laurie | last post by:
Hi all, I'm trying to help out a friend who has inherited a client with a PHP shopping cart application. Neither of us know PHP, but I've been muddling my way through, trying to get these old...
33
by: Lee C. | last post by:
I'm finding this to be extremely difficult to set up. I understand that Access won't manage the primary key and the cascade updates for a table. Fine. I tried changing the PK type to number and...
1
by: Mike | last post by:
I have an ASP.NET/VB app that updates values in a DataTable over the course of about 3 different pages. On the way out of the first of these pages, I explicitly build the DataTable from values in...
4
by: steroche | last post by:
I would REALLY appreciate help please please please! Im sure it is probably blindingly obvious to most of you but I am totally in the dark here!I am lost - i thought i had finally figured out this...
1
by: Mike | last post by:
I have an ASP.NET/VB app that updates values in a DataTable over the course of about 3 different pages. On the way out of the first of these pages, I explicitly build the DataTable from values in...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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,...

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.