title: running around 220 insert into mysql and php
body: <p>I have about 20 files which have mysql queries to be run,</p>
  
  <p>Example of file1.php,file2.php,file3.php</p>
  
  <pre><code>&lt;?php
  $s = array();
  foreach($j as $y) {
  //codes
  $s[] = "($link, $img)";
  }
  
  mysql_query("INSERT INTO xyz VALUES ".implode(',',$s));
  ?&gt;
  </code></pre>
  
  <p>file1.php,file2.php,file3.php are more about same and requires insert into queries to be run. //insert into varies on each file and dynamic based on input</p>
  
  <p>I have run.php which</p>
  
  <pre><code>&lt;?php
  require 'file1.php';
  require 'file2.php';
  require 'file3.php';
  ?&gt;
  </code></pre>
  
  <p>so the execution of file1, file2 and file3 depends on run.php</p>
  
  <p>is this safe way to do it? or should i move the mysql insert into at run.php (run all queries together) instead of leaving it in individual files (file1,file2,file3).</p>
  
  <p>What would be the best way to send data from file1.php to run.php? method, echo?</p>