[HELP]add more than 1 item??

Results 1 to 2 of 2
  1. #1
    RageZ Hell kekku500 is offline
    MemberRank
    Nov 2006 Join Date
    EstoniaLocation
    672Posts

    [HELP]add more than 1 item??

    Code:
    ?></td>
      </tr>
    </table>
    <table width="730" border="1" bordercolor="#A0A0A4">
      <tr>
        <td bordercolor="#A0A0A4"><em><strong>EVENT ITEMS ADDER</em></td>
      </tr>
      <tr>
        <td bordercolor="#A0A0A4"><FORM METHOD=POST ACTION="<?php echo $_SERVER['PHP_SELF']; ?>?act=additem">
          CID: 
          <input name="cid" type="text" id="cid" />
            <input type="submit" name="Submit4" value="Add Item" />
        </form>
        </td>
      </tr>
      <tr>
        <td width="730" bordercolor="#A0A0A4">Results:    
        <?php 
            if ($_GET['act'] == 'additem')
    {
        $cid = anti_injection($_POST['cid']);
        if (valida(Array($cid,$id)) == true)
        {
        $query = $sql=mssql_query("INSERT INTO Items (CID, ItemID) VALUES ('$cid', '19051')");
                if ($sql) echo "To CID $cid Have Been added item $id."; else echo 'There is a problem.';
        }
    }
    My problem is in this line:
    Code:
        $query = $sql=mssql_query("INSERT INTO Items (CID, ItemID) VALUES ('$cid', '19051')");
    So how i can add more than 1 item
    well i know this not work '19051,19052'


  2. #2
    Proficient Member Crypto37 is offline
    MemberRank
    Jan 2007 Join Date
    New YorkLocation
    195Posts
    Run multiple Querys?
    or try somthing like..

    $query = $sql=mssql_query("INSERT INTO Items (CID, ItemID) VALUES
    ('$cid', '0')
    ('$cid', '1')");

    I Checked my MSSQL / MYSQL Book and thats all i could find O.o



Advertisement