473,626 Members | 3,234 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Parameter passing to php. can anyone help me debugging the code

36 New Member
Hi,

I want to pass the parameter of employee_id to a page. My code is working fine and passing parameter to page but the problem is rather then the current parameter. It passed the parameter which was selected in previous submit. Below is the code.

Expand|Select|Wrap|Line Numbers
  1. <form action='manager_employee_select.php?proc_employee_id=<?php echo $_POST['proc_employee_id']; ?>' method="POST">
  2. <table>
  3. <tr> My team members timesheet</tr>
  4.  
  5. <tr>Select a team member from the list to continue</tr>
  6. <tr>
  7.  
  8.         <?php
  9.            $conn = pg_connect("host=localhost port=5432 dbname=aim user=postgres password=holiday");
  10.          $result = "select employee_id,first_name || '' || last_name as name from employee where reporting_manager_id = '1113'";
  11.              $result =  pg_query($conn, $result) or die(pg_last_error());
  12.  
  13.  
  14.         ?>
  15.  
  16.         <?php echo "<td name = \"employees\"  >
  17.         <select name=\"proc_employee_id\" id=\"dropdown\" >"; ?>
  18.         <option value=""></option>5
  19.         <?php
  20.  
  21.           while($emps = pg_fetch_assoc($result))
  22.         {
  23.           $val = $emps["employee_id"];
  24.           $caption = $emps["name"]; ?>
  25.         <option value="<?php echo $val ?>"><?php echo $caption ?></option>
  26.         <?php }  ?></select>
  27.             </td>
  28. </tr>
  29. </table>
  30. <input name="submit" value="Continue" type="submit">
  31. </form>
  32.  
Many Thanks in advance
Oct 13 '09 #1
1 2245
zorgi
431 Recognized Expert Contributor
The only place I can see that you store anything from the previous page is this:

Expand|Select|Wrap|Line Numbers
  1. <form action='manager_employee_select.php?proc_employee_id=<?php echo $_POST['proc_employee_id']; ?>' method="POST">
  2.  
Every next submit in its url has
Expand|Select|Wrap|Line Numbers
  1. proc_employee_id=<?php echo $_POST['proc_employee_id'] 
  2.  
Oct 13 '09 #2

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

Similar topics

1
1900
by: Radx | last post by:
Hello All I am having a very hard timt exporting crystal report to PDF document in my ASPX page. I am able to generate the PDF document , but the i am not able to pass the parameter to the report (Crystal). It looks like , it completely ignores the parameter i am passing and just brings all the records from the database. When i run the report directly from Crystal , it works fine. So I know report works fine . For some strange...
2
1536
by: Nautilus | last post by:
Taken from a couple very similar samples on the net, I'm having trouble passing a parameter to a PHP file. Here's all the JS code ... it creates an image object and modifies it's src to make a 'call' to the PHP file: var myobj = new Image(); myobj.src = 'http://www.mypage.com/my.php?url=' + 'anything_here'; The process seems to recognize that the file URL ends at the "?", and system logs show that the GET of the PHP file was...
4
4864
by: Ron Rohrssen | last post by:
I want to show a dialog and when the form (dialog) is closed, return to the calling form. The calling form should then be able to pass the child form to another object with the form as a parameter. For example, FormOptions formOptions = new FormOptions(); if (formOptions.ShowDialog(this) == DialogResult.OK) {
5
5824
by: jlea | last post by:
I'm trying to pass a filename, obtained with using the fileName property from the OpenFileDialog, as a application parameter in Process.StartInfo.Arguments and run a MFC/C++ application using the Start method. When I hardcode the application parameter such as "/name=c:\\myFile.txt" all is well in the C++ application. When I use the fileName property to build the parameter, the string becomes @"/name=c:\myFile.txt" which makes the C++...
5
25385
by: MS | last post by:
Here's my simple stored procedure: ALTER PROCEDURE GetMemberIDByEmail @Email EmailAddress, @ID int OUTPUT AS SELECT @ID = ID FROM tbl_Member WHERE Email=@Email RETURN
0
1014
by: Radx | last post by:
Hello All I am having a very hard timt exporting crystal report to PDF document in my ASPX page. I am able to generate the PDF document , but the i am not able to pass the parameter to the report (Crystal). It looks like , it completely ignores the parameter i am passing and just brings all the records from the database. When i run the report directly from Crystal , it works fine. So I know report works fine . For some strange...
3
1881
by: JohnnyGr | last post by:
I have heard theres a new way to start threads with parameters in framework 2.0, does anyone know how to do that? this is what i need to do... Start a thread that executes some stuff, in this case it does gets all files from a directory. then i need to update the GUI with information from the thread... the thread should be started with a parameter, in this case its a string
3
2097
by: Ross McLean | last post by:
Hi all, I've been teaching myself C# for a new project at work. I have a bit of a background in c++ and java but never been what you could call a guru. I'm having some strange things happening when I pass a class as a parameter to a Windows Form. Basically, I have a class that has several fields, two of these fields are an instance of an inner class, the rest are basic value types (bool's in this case). I have a windows form, the...
16
3375
by: Theo R. | last post by:
Hi all, Does the C99 Standard explicitly mention the need for a stack for passing arguments or Is this platform specific? As an example, the ARM9 processor recommends Core Registers R0-R3 be used when passing less than four parameters. However some compilers for ARM9 do not follow this recommendation and place all parameters on the stack. Therefore, the question arises if the compilers were following the C Standard instead.
0
8203
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8711
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...
1
8368
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7203
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
6125
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
5576
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4206
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2630
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
1515
bsmnconsultancy
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...

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.