SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast MAC#1's Avatar
    Join Date
    Mar 2003
    Location
    ontario
    Posts
    74
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Talking still UNABLE to figure this out.. array help needed please

    The following is only a snippet of 30 items that I need to have entered into a Mysql database and also sent through email. Problem is ...because I'm new to PHP I am unclear of the proper procedure to set this into an array so that I can manipulate these items without having 30 rows of quantity/number/item/price in the database.

    Here is what I have:
    PHP Code:
    $quantity1=$_REQUEST["quantity1"]; 
    $number1=$_REQUEST["number1"]; 
    $item1=$_REQUEST["item1"]; 
    $price1=$_REQUEST["price1"];
    $quantity2=$_REQUEST["quantity2"]; 
    $number2=$_REQUEST["number2"]; 
    $item2=$_REQUEST["item2"];  
    $price2=$_REQUEST["price2"];  //this continues til $blah30 (30 for each)

    // into email
    $quantity1 $number1 $item1 $price1
    $quantity2 $number2 $item2 $price2 
    // also til $blah30 

    How do I do an array so that I can just have a column for quantity, number, item allowing the possibility of 30 ordered items to be entered?
    Last edited by MAC#1; May 9, 2003 at 19:17.

  2. #2
    if($awake){code();} PHP John's Avatar
    Join Date
    Jul 2002
    Location
    Along the Wasatch Fault line.
    Posts
    1,771
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So, what is the problem?
    John


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •