Guest User

Untitled

a guest
Jan 23rd, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.00 KB | None | 0 0
  1. $sql="INSERT into data (owner, name, manufacturer, package, pins, smd, quantity, location, scrap, width, height, depth, weight, datasheet, comment, category, url1, url2, url3, url4, price, public, order_quantity, ordera)
  2. VALUES
  3. ('".$owner."','".$name."','".$manufacturer."','".$package."','".$pins."','".$smd."','".$quantity."','".$location."','".$scrap."','".$width."','".$height."','".$depth."','".$weight."','".$datasheet."','".$comment."','".$category."','".$url1."','".$url2."','".$url3."','".$url4."','".$price."','".$public."','".$orderquant."')";
  4.  
  5. $sql_exec = mysql_query($sql);
  6.        
  7.     foreach ($project as $p){
  8.         $component_ids = mysql_insert_id();
  9.         $proj_add="INSERT into projects_data (owner_id, project_id, component_id)
  10.         VALUES
  11.         ('".$owner."','".$p."','".$component_ids."')";
  12.                
  13.         $sql_exec = mysql_query($proj_add);
  14.     }
  15.    
  16. echo '<br />Component added!';
  17. echo '<br /><a href=".">Home</a>';
  18. echo '<br />';
  19. echo '<a href="component.php?view=';
  20. echo mysql_insert_id();
  21. echo '">View component</a>';
Add Comment
Please, Sign In to add comment