[HELP]add more than 1 item??

Joined
Nov 17, 2006
Messages
511
Reaction score
0
Location
Estonia
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'
 
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
 
Upvote 0
Back