First: use firebug, or something like that, and check what's get "written"
in the page's source!
Second: dump $_POST/$_GET, and check, whether "id" is set at all

Is your input field between the <form> and </form> tags?



-----Original Message-----
From: Chris Stinemetz [] 
Sent: Monday, August 08, 2011 11:23 PM
To: PHP General
Subject: [PHP] form hidden value

I'm trying to pass a hidden value with my form submission. Not sure what I
am doing woring, but the value is not being passed.

Query is___

    $query = "SELECT id, store_name FROM store_list WHERE store_type =
'$type' AND id_market = '$market' "      ;
    $result = mysql_query($query) or die(report($query,__LINE__ ,__FILE__));

    while($row = mysql_fetch_array($result))
        $store_name[] = $row['store_name'];
        $id[] = $row['id'];


Form portion is____

<input type="hidden" name="id" value="<?php echo '$id[]';?>">

Any help is greatly appreciated. Thank you.

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to