Forum Replies Created
-
Hello Richard,
Try something like this on the sending page for the quantity input field:
<?=$row_Recordset1['description']?>: <input type='text' size=2 value='' name="product_qnty_<?=$row_Recordset1['description']?>" />This will put the key of the post field as product_qnty_ with the product description that you’re using to find the product (though this would be better if it was a product id). The post value will be a numeric quantity.
On the processing page you can get your product quantity information by doing something like this:
<?
//KEY FOR QUANTITY FIELDS
$qnty_key="product_qnty_";//LOOP THROUGH THE POST FIELD
foreach($_POST as $key => $val)
{
//IF THE BEGINNING OF THE POST FIELD IS THE QUANTITY KEY AND THE VALUE IS A NUMBER AND THE NUMBER IS OVER ZERO
if(substr($key,0,strlen($qnty_key))==$qnty_key && is_numeric($val) && $val > 0)
{
$prod_description=substr($key,strlen($qnty_key));
echo $prod_description.": ".$val."<br/>";
}
}
?>I didn’t check the code but it should work.
-
Hello Richard,
Do you have a URL example?
I’m hearing what I think Fernando is hearing you say. The input quantity fields are going to have a name with a product id or some other key that will tell your system what product the quantity value is to be paired with:
<ul>
<li>
Product 1: <input type='text' size=2 value='' name='product_qnty_1' />
</li><li>
Product 2: <input type='text' size=2 value='' name='product_qnty_2' />
</li><li>
Product 3: <input type='text' size=2 value='' name='product_qnty_3' />
</li>
</ul>If your form method is post you might try doing a
echo var_dump($_POST);To check what variables are being passed before you move forward.
-
Abraham Chaffin
January 4, 2011 at 3:30 pm in reply to: Cinema 4D Beginner -> Intermediate TutorialsThere are a few good C4D tutorials here at Creative COW:
https://library.creativecow.net/tutorials/cinema4d
Many of these are also available as podcasts here:
https://podcasts.creativecow.net/3d-animation-tutorials-podcast -
Hello Joel,
This should be fixed now – iTunes should update next time iTunes pings the RSS.
Appreciate you alerting us to the issue.
-
Abraham Chaffin
January 1, 2011 at 1:31 am in reply to: Parse error: syntax error, unexpected T_ELSEYou have an “else if” right after the end of a function the “}” before the else if is ending the function… that’s why you have an error.
function validate_form()
{
//start out with no errors
$errors = array();//name is required
if (! strlen($_POST['first_name']))
{
$errors['first_name'] = 'Enter your first name.';
}
return $errors;
}
else if ($stage == 2)
{ -
Hello Mark,
Right now if we remove you from one forum we’d have to remove you from all forums which is probably why this hasn’t been done yet. I’ll discuss this further with the rest of the team.
-
Hello Theo,
Your name appears on the top of the forum because you are a frequent poster in this forum.
-
The old movie and COW pics are images where the user hasn’t uploaded their mug shot. Hopefully users will soon realize they should upload their mug shot so those pictures show up a little less frequently.
-
Hello Theo,
What do you mean by “the pictures are completely messed up”? Can you post a screen show or elaborate on what you are experiencing?