I have an application that uses PHP to access a MySQL table and
extract rows which match the user's search entry. Data from the
matching rows are loaded into an HTML selection list, and the user can
scan the list and highlight a selected item.
My question: In PHP, what is the syntax for identifying which row is
highlighted?
My goal is to pass the unique row ID of the selected item to a
subsequent form where all the fields will be displayed for the user to
edit.
I already have the code that loads the selection list and the code
that displays the fields. I just need to know how to determine the
highlighted item.
I have two PHP books, and both discuss loading the selection list, but
there is no mention of what to do next.
Thanks!!
Mark Jones 5 4694
I noticed that Message-ID:
<5e************ **************@ posting.google. com> from Mark contained
the following: My goal is to pass the unique row ID of the selected item to a subsequent form where all the fields will be displayed for the user to edit.
I already have the code that loads the selection list and the code that displays the fields. I just need to know how to determine the highlighted item.
assuming you have your select box set-up like this:
<select name="rowselect or">
<option value="rowID">R ow description</option>
next option etc..
</select>
The highlighted value will be passed back as the variable
$_POST["rowselecto r"]
Just do a query with that value in the WHERE clause and populate the
form with the results.
--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Thanks, Geoff! That worked. The only thing I'm still wondering about
is the value returned in $_POST["rowselecto r"] is followed by a
period. I used the trim function to remove the period and the query
worked great. Any idea why the period is there?
Many thanks,
Mark Jones
Geoff Berrow <bl******@ckdog .co.uk> wrote in message news:<0e******* *************** **********@4ax. com>... I noticed that Message-ID: <5e************ **************@ posting.google. com> from Mark contained the following:
My goal is to pass the unique row ID of the selected item to a subsequent form where all the fields will be displayed for the user to edit.
I already have the code that loads the selection list and the code that displays the fields. I just need to know how to determine the highlighted item.
assuming you have your select box set-up like this:
<select name="rowselect or"> <option value="rowID">R ow description</option> next option etc.. </select>
The highlighted value will be passed back as the variable $_POST["rowselecto r"]
Just do a query with that value in the WHERE clause and populate the form with the results.
I noticed that Message-ID:
<5e************ **************@ posting.google. com> from Mark contained
the following: Thanks, Geoff! That worked. The only thing I'm still wondering about is the value returned in $_POST["rowselecto r"] is followed by a period. I used the trim function to remove the period and the query worked great. Any idea why the period is there?
None at all. You'd have to post your code.
--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
On Mon, 15 Dec 2003 19:51:19 +0000, Geoff Berrow
<bl******@ckdog .co.uk> brought forth from the murky depths: I noticed that Message-ID: <5e*********** *************** @posting.google .com> from Mark contained the following:
Thanks, Geoff! That worked. The only thing I'm still wondering about is the value returned in $_POST["rowselecto r"] is followed by a period. I used the trim function to remove the period and the query worked great. Any idea why the period is there?
None at all. You'd have to post your code.
You really should have known the answer to that one, Geoff.
It was, of course, a female file. <gd&r>
---
- Sarcasm is just one more service we offer. - http://diversify.com Web Applications
I noticed that Message-ID: <d3************ *************** *****@4ax.com>
from Larry Jaques <jake@di\/ersify.com> contained the following: worked great. Any idea why the period is there?
None at all. You'd have to post your code.
You really should have known the answer to that one, Geoff. It was, of course, a female file. <gd&r>
And here was me thinking it might just have been the Christmas period.
:-)
--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/ This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Rob |
last post by:
I have 2 drop down menus. 1 is to pick a Province and the other is to
pick a trade (plumbng electrical etc)
The user selects which province and then what trade then hits submit
which should list all entries in the table. How would I formulate the
select statment for MySQL to display the results in a webpage. The
variable in my form are $province and $category
|
by: Rick Delorme |
last post by:
Hi Everyone,
I have 2 problems I am currently investigating. I am hopeful that
someone out there can help me out.
1. I have a windows user control in the web browser. This control has a
dropdown list. This control is also displayed within a Microsoft TabStrip
control. When I click to the tab hosting the control, I then try to pick the
dropdownlist. The first time going to the tab and picking the drop down
list, the drop down list...
|
by: Jim Cobban |
last post by:
I am trying to create a web page in which the contents of one selection list
depends upon which element in another selection list is chosen, but where
the information to populate the first selection list comves from an SQL
database on the web server.
There are a couple of these situations in my application but, for example,
the first list might be a list of counties, and the second list a list of
states/provinces. Obviously the names of...
|
by: Stephen |
last post by:
Could someone please help me with some validation. I have to write code which
checks to see whether a dropdown list is populated with a value or a checkbox
is checked. I want the code to run on the on-click of a button.
My page has 1 dropdown list and two checkboxes. So I either want the user
to choose an item from the dropdownlist OR tick a checkbox(it doesn't matter
if they tick both checkboxes). I can't allow the user to fill in the...
|
by: Christopher Weaver |
last post by:
I want to set a value in a specific field in the current row of a DataSet.
This seems like the most basic thing to do but I can't find the syntax for
identifying the current row.
IOW, I can do this:
SomeRow = 'value';
But how do I set SomeRow to the row that the user is currently viewing?
| |
by: MLH |
last post by:
I have a vehicle entry form with a combo box for choosing
the owner. Let's say the user opens the list by clicking the
arrow then choose the owner by clicking a name. That much
works fine.
But the problem begins here...
If for some reason, the user is uncertain of his first choice of
an owner and decides to drop the list down again, using his
keyboard up 'n down arrows to scroll the list, browsing for
other owner choices until he's...
|
by: Tom P. |
last post by:
I am having the following problem: I create a FileSystemWatcher and
wait for events. When the event does happen I refresh a
FileSystemInfo list and set properties accordingly (IsFile, IsDir,
ReadOnly, etc.). The problem I'm having is in identifying when a
FileSystemInfo entry is a FileInfo or a DirectoryInfo type. I get the
rare, and yet oddly common, "setup.inf" file that for some
inexplicable reason passes the standard...
|
by: =?Utf-8?B?UGF1bA==?= |
last post by:
Hallo,
I have a radiobuttonlist control that is added on a custom Web User Control.
This control has a property that exposes the SelectedIndex property of the
embedded radiobuttonlist.
When running this in IE, behaviour is as I would expect it. If I select an
item and do a postback, the page remembers my selection when reloading, and
the SelectedIndex property of my control returns the correct value.
|
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...
|
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...
|
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...
| |
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |