![]() |
Help needed... FORMS & PHP (not as noob as you think)
Ok, here's my problem:
I'm currently using an XHTML form (duh), which sends some data to a PHP file. Now, one of the text input boxes, looks like this: HTML Code:
<input name="products[$order[productid]][quantity]" type="text" class="bginput" value="1" size="2"> HTML Code:
products[1][quantity] I'm pretty sure this is possible, but I can't figure it out. Help is appreciated, as always. |
I'd parse the $variable OUT of html personally.
|
Yes, but doing it like this is a lot more effective (you would need to see the code to understand this, though)
|
Try:
PHP Code:
|
I don't get how I could get that "1" from products[1][quantity] with your code...
I've tried str_replace, but I would need to know the number already... If it is possible with your code, could you maybe give an example? |
$products will hodl the '1'.
I already gave you an example. |
I believe you when you say it'll hold a 1, trust me ^^.
But the question is, how should I define products[1][quantity] with that code? Should I globalize it, or just use the $_POST['products[1][quantity]']? |
You should globalize it, but using the $_POST would also work.
|
Could you maybe give an example?
What I'm doing is this: PHP Code:
Code:
Warning: Invalid argument supplied for foreach() in /products.php on line 70 PHP Code:
|
PHP Code:
|
All times are GMT. The time now is 01:32 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|