wrong passed parameter

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Locked
User avatar
apek
Forum Commoner
Posts: 96
Joined: Tue Jan 06, 2004 11:19 pm
Location: Holiday Plaza Johor Bahru

wrong passed parameter

Post by apek »

i heard to know what items that being posted by your server is to put this

Code: Select all

<pre>
print_r($_POST); // print_r()
?></pre> ?>
snippet between the </form> and the </body>

and it does...

at my first page which before i click the submit button..the code brings this output..

Code: Select all

Array
(
    &#1111;Submit2] =&gt; SUBMIT
)
after i click the code shows this output:

Code: Select all

Array
(
    &#1111;ref] =&gt; 001
    &#1111;pelapor] =&gt; gfbcbc
    &#1111;tarikhRosak] =&gt; 01/01/2004
    &#1111;noTag] =&gt; M01
    &#1111;ID] =&gt; REF001/2004
    &#1111;hariIni] =&gt; 01/11/2004
    &#1111;front] =&gt; W
    &#1111;submit] =&gt; SUBMIT
)
my problem is that the front should be not "W"...i chose B,E,R(anything except W) at the submit page but it keeps sending W.
Why?

how to fix this??
and i really confused,why at default,the combobox(where i choose W,E,,B and R) shows the W?it should display the "Please Choose Your ID"..

anyone can help me?
qads
DevNet Resident
Posts: 1199
Joined: Tue Apr 23, 2002 10:02 am
Location: Brisbane

Post by qads »

post your html for the combo box.
User avatar
apek
Forum Commoner
Posts: 96
Joined: Tue Jan 06, 2004 11:19 pm
Location: Holiday Plaza Johor Bahru

here it is...

Post by apek »

this is the html for the combobox (at the sumbit page)

Code: Select all

<select name="noTag" size="1" >
            <option value="0">Choose Major ID&nbsp;&nbsp;&nbsp;</option>
            <?php

   //----------------------------------------------------
   //          Access Data From MySQL
   //          TABLE : tPartMajor
   //----------------------------------------------------

	$query2 = "Select idMajor from ".$DBprefix." tPartMinor where idmajor <>'' group by idmajor order by idmajor";
	$mesin = mysql_query($query2);
			while ($dbq = mysql_fetch_array($mesin)) &#123;
			echo("<OPTION VALUE=$dbq&#1111;idMajor] selected>$dbq&#1111;idMajor]</option>\n");
			$ayam=$dbq&#1111;idMajor];
			$depan=substr("$ayam",0,1);
						&#125;
?>
          </select>

pls help..
i can't find the problem
User avatar
JAM
DevNet Resident
Posts: 2101
Joined: Fri Aug 08, 2003 6:53 pm
Location: Sweden
Contact:

Post by JAM »

View my post in viewtopic.php?t=16557 about how you should write html. You need to add quotes.
Locked