473,473 Members | 2,320 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

select

Hi,

I have following problem.

In a form I have a control lsDocent. I want send the value to another page.
He send the second parameter 'code' but he send the string lsDocent to the
other page instead of the value of lsDocent.

What's wrong with this?

<form name="verwijder" action="vak_info.php?doc=lsDocent&&code=<?echo
$code?>" method = "post">
<SELECT name="lsDocent">
<?php
while ($line = mysql_fetch_array($resultaat, MYSQL_ASSOC)) {
?>
<!--
genereren van lijst van docenten
-->
<OPTION selected value="<?print $line["Leraarscode"];?>"><?print
$line["Familienaam"];?> <?print " - "?> <?print
$line["Voornaam"];?></OPTION>

<?php
}
?>
</SELECT>
</td>
<td>
<input type = "submit" Value="OK">
</td>
</form>
</TR>
ALain
Jul 17 '05 #1
3 2063
Alain Dhaene <al**********@worldonline.be> wrote:
In a form I have a control lsDocent. I want send the value to another page.
He send the second parameter 'code' but he send the string lsDocent to the
other page instead of the value of lsDocent.

What's wrong with this?
At first glance nothing (except it quite ugly and inconsistent).
<form name="verwijder" action="vak_info.php?doc=lsDocent&&code=<?echo $code?>" method = "post"> ^^ one & to many
<SELECT name="lsDocent"> [snip] <OPTION selected value="<?print $line["Leraarscode"];?>"><?print
$line["Familienaam"];?> <?print " - "?> <?print
$line["Voornaam"];?></OPTION>


What's the output of the script? Is the value realy in the row
'Leraarscode' and not in 'Leraarcode'?

--

Daniel Tryba

Jul 17 '05 #2
The output is
lsDocent and the value of the code e.g A

In the select box I get a row of Stings (the code of a docent). I thought
when I select one of them then the value of lsDocent will retrieve this
value and so I post this value to the other form. But I retrieve the text
lsDocent.

Alain

"Daniel Tryba" <ne****************@canopus.nl> schreef in bericht
news:bp**********@news.tue.nl...
Alain Dhaene <al**********@worldonline.be> wrote:
In a form I have a control lsDocent. I want send the value to another page. He send the second parameter 'code' but he send the string lsDocent to the other page instead of the value of lsDocent.

What's wrong with this?
At first glance nothing (except it quite ugly and inconsistent).
<form name="verwijder" action="vak_info.php?doc=lsDocent&&code=<?echo

$code?>" method = "post"> ^^ one & to many
<SELECT name="lsDocent">

[snip]
<OPTION selected value="<?print $line["Leraarscode"];?>"><?print
$line["Familienaam"];?> <?print " - "?> <?print
$line["Voornaam"];?></OPTION>


What's the output of the script? Is the value realy in the row
'Leraarscode' and not in 'Leraarcode'?

--

Daniel Tryba

Jul 17 '05 #3
Alain Dhaene wrote:
Hi,

I have following problem.

In a form I have a control lsDocent. I want send the value to another page.
He send the second parameter 'code' but he send the string lsDocent to the
other page instead of the value of lsDocent.

What's wrong with this?

<form name="verwijder" action="vak_info.php?doc=lsDocent&&code=<?echo
$code?>" method = "post">
<SELECT name="lsDocent">
<?php
while ($line = mysql_fetch_array($resultaat, MYSQL_ASSOC)) {
?>
<!--
genereren van lijst van docenten
-->
<OPTION selected value="<?print $line["Leraarscode"];?>"><?print
$line["Familienaam"];?> <?print " - "?> <?print
$line["Voornaam"];?></OPTION>

<?php
}
?>
</SELECT>
</td>
<td>
<input type = "submit" Value="OK">
</td>
</form>
</TR>
ALain

I think it is an error in the first line:
<form name="verwijder" action="vak_info.php?doc=<? echo $lsDocent;
?>&&code=<?echo
$code?>" method = "post">
So you must attribute lsDocent in a php script.

Jul 17 '05 #4

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

Similar topics

1
by: JT | last post by:
I have an input form for which I've created a "matrix" for user input. Basically, the user chooses a radio button and then through javascript, a select box is displayed to define a value for that...
4
by: Elroyskimms | last post by:
Using SQL 2000... tblCustomer: CustomerID int CompanyName varchar(20) HasRetailStores bit HasWholesaleStores bit HasOtherStores bit tblInvoiceMessages:
4
by: bobsawyer | last post by:
I've been building a series of SELECT lists that are populated dynamically using HTTPRequest. Things are going pretty well, and I've got the whole thing working flawlessly in Mozilla/Firebird....
3
by: dumbledad | last post by:
Hi All, I'm confused by how to replace a SELECT statement in a SQL statement with a specific value. The table I'm working on is a list of words (a column called "word") with an index int...
10
by: serge | last post by:
Using "SELECT * " is a bad practice even when using a VIEW instead of a table? I have some stored procedures that are identical with the difference of one statement in the WHERE clause. If I...
1
by: serena.delossantos | last post by:
Trying to insert into a history table. Some columns will come from parameters sent to the store procedure. Other columns will be filled with a separate select statement. I've tried storing the...
9
chunk1978
by: chunk1978 | last post by:
hey everyone, i've been trying to solve this problem for 2 days straight, with no end in sight. i would greatly appreciate anyone's help. EXPLANATION: There are 3 Select Menus. The 1st and...
2
by: naima.mans | last post by:
Hello, i want to select 2 following brothers nodes wich are one under another (one closed to another)... i have done one xslt file... but it's not really good.. for example: the xml file:...
4
by: rn5a | last post by:
A Form has 2 select lists. The 1st one whose size is 5 (meaning 5 options are shown at any given time) allows multiple selection whereas the 2nd one allows only 1 option to be selected at a time. ...
6
by: Apaxe | last post by:
In the database i have a table with this information: key_id =1 key_desc =43+34+22+12 I want sum the values in key_desc. Something like: SELECT key_desc FROM table But the result of...
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
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...
1
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...
0
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,...
1
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...
1
muto222
php
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.