Jump to content

Create a POST from a PHP script - not html


liderbug

Recommended Posts

I'm working on bulk loading data into a DB.  The orig web page has the form, method=POST.  Works fine ... 1. i.t.e.m. a.t. a. t.i.m.e.  So I've figured out what I need to populate: $item = "Widget, red"; $quantity = 7; etc. etc. etc.  Which I can do in foo4.php and then call "insert_data.php".  However insert_data starts out with: $item = $_POST['item'];

 

What I can't figure out is how to POST item in foo4 before calling insert_data  :-\

 

Thanks.

cal

insert_data.php is part of a larger package (zen cart).  In the larger schema the code runs thru files A,B,C,D,insertdata,F,G,(backto)A.  So I wrote foo4 to take the place of "D" which will have the lines: $data = file("data.csv");  foreach($data.... call insert_data.php.  I know it can be done - just a mater of getting all of the duck properly lined up.

 

cal

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.