Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > PHP How-To
|
PHP How-To Post your "How do I do this with PHP?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 11th, 2004, 04:50 AM
Authorized User
 
Join Date: Jan 2004
Posts: 33
Thanks: 0
Thanked 0 Times in 0 Posts
Default wrong passed parameter

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

Code:
<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:
Array
(
    [Submit2] => SUBMIT
)
after i click the code shows this output:
Code:
Array
(
    [ref] => 001
    [pelapor] => gfbcbc
    [tarikhRosak] => 01/01/2004
    [noTag] => M01
    [ID] => REF001/2004
    [hariIni] => 01/11/2004
    [front] => W
    [submit] => 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?

this is the html for the combobox (at the sumbit page)
Code:
          <select name="noTag" size="1" >
            <option value="0">Choose Major ID   </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)) {
         echo("<OPTION VALUE=$dbq[idMajor] selected>$dbq[idMajor]</option>\n");
         $ayam=$dbq[idMajor];
         $depan=substr("$ayam",0,1);
                  }
?>
          </select>

pls help..
i can't find the problem
 
Old January 11th, 2004, 01:08 PM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

Cross-post with topic:
http://p2p.wrox.com/topic.asp?TOPIC_ID=8284

Please post replies there!

:::::::::::::::::::::::::::::::::
Smiling Souls
http://www.smilingsouls.net
:::::::::::::::::::::::::::::::::





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to passed an xsl parameter to a javascript fun jadeite100 XSLT 1 June 22nd, 2007 02:51 PM
passed in IBM Exams hellblazer Need help with your homework? 0 April 1st, 2006 03:27 PM
Value in Querystring not being passed u_heet Classic ASP Professional 2 September 16th, 2004 07:15 AM
All My Checkboxes are passed as "on", whether or n WebDevel Javascript How-To 1 December 9th, 2003 10:40 AM
Arrays seem to be passed byRef always srbeckle VB.NET 2002/2003 Basics 0 July 25th, 2003 10:36 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.