Hello!
How can I send a form's informations to several php file...!?
For example, a user with a form can to register several website or blog.
I am waiting for your guidance and thanks!

Please explain this further. Do you know about this training or Subject!
thanks!!

I had a similar problem so what I did was link php with Javascript.

On the form submit button:

<input id="Cart66CheckoutButton" class="Cart66ButtonPrimary Cart66CompleteOrderButton" type="submit"  onclick="submitTwice(this.form);" value="Complete Order" name="Complete Order"/>

you will notice the on click event.
then above the form in javascript I have :

<script type="text/javascript">
function submitTwice(f){
f.action = '';  // whatever your form action is or you can leave blank.
f.target ='_self';
f.submit();
<?php    /* your php code here */?>

}
</script>

Now where the php code is you can include the php files and call the functions to perform actions on the submitted data. Hope that helps.

You do know that the php code is executed when the page is generated, and not when the javascript function is called ?

I believe line 4/5 of the javascript code generates a new page. It works (I tested it in opera, safari, ie 9, firefox) cross browser I can give you the site I used it on.

It is similar to using

<?php echo $_SERVER["PHP_SELF"];?>

as the action to a form. It refreshes the page, thus calling the php. My script was used to send an email to the site owner because cart 66 does not allow creditcard capture of manual checkout. The next line of PHP in the above code is:

<?php 
$someVariable = $_POST['cardNumber']; 
if($someVariable != ""){ /* email info here */ }

?>

It works try it.

*actual variable names have been changed

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.