Jump to content

Storing array values from form


mallen

Recommended Posts

I think I finally got it working. Thanks again for helping me through this. I have learned more about arrays than I ever have.

<input type="hidden" name="ords[]" <?php if($editProduct) echo "value='{$cat['p_order']}'"; ?>/>
	
---------------------------------------------
	
$ords =	$_REQUEST['ords'];
		
$catCategory = "INSERT INTO category_assoc (prod_id, cat_id, p_order) VALUES('$lastID', '". $cats[$i] . "','". $ords[$i] . "')";
	
---------------------------------------------
	
I think the quote marks were an issue. Also these two parts. 
$ords[$i]
name="ords[]"		
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.