interMedia
interMedia

Reputation: 13

is it possible to still access the submitted form data?

My main goal is to save the user's submitted form data into our MSSQL database and email service provider (iContact)

I am constraint of using iContact's page as the action attribute. Here is the example:

< form action="icontact.php" id="" >

After the iContact.PHP run, it will redirect the page to my confirmation page.

So is it possible to still access the submitted form data? So I can then run my own codes to save it on my database?

Thanks!

SIDE NOTE: iContact is an email marketing service that I use. I have contacted iContact's developer and said that I am required to use their icontact.php page to be able to store my data into their email contact database.

Current Structure:

  1. User fills out the Form in HTML, user submits
  2. Goes to iContact php page (which I don't have control)
  3. After #2 process, redirect the page into my confirmation page.

Upvotes: 0

Views: 98

Answers (1)

marvin
marvin

Reputation: 375

You can use session for that.

simply include

session_start();

at the top of both icontact.php and nextpage.php;

then in icontact.php, you set the session variables from post variables like

$_SESSION['data1'] = $_POST['data1'];
//etc.

and in nextpage.php you store them like

$data1 = $_SESSION['data1'];
mysql_query("INSERT INTO mytable(field,etc) VALUES ('$data1','$etc');" , $connection);

Upvotes: 1

Related Questions