Guest User

Untitled

a guest
Jan 23rd, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.08 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.  
  10.                         $proj_add="INSERT into projects_data (owner_id, project_id, component_id)
  11.                         VALUES
  12.                         ('".$owner."','".$p."','".$component_ids."')";
  13.                        
  14.                         $sql_exec = mysql_query($proj_add);
  15.                     }
  16.                    
  17.                 echo '<br />Component added!';
  18.                 echo '<br /><a href=".">Home</a>';
  19.                 echo '<br />';
  20.                 echo '<a href="component.php?view=';
  21.                 echo mysql_insert_id();
  22.                 echo '">View component</a>';
Add Comment
Please, Sign In to add comment