[Solved] How to post form value to url and database using php [closed]


First of all, break your code up into sections and test each section.

First, test that you have received the data correctly. A single error can stop the entire page from processing, so ensure you are receiving what you think you are receiving:

$name = $_POST['name'];
$phone = $_POST['phone'];
$email = $_POST['email'];
...etc...
$zz = 'RECEIVED DATA:<br /><br />';
$zz .= 'Name: [' .$name. ']';
$zz .= 'Phone: [' .$phone. ']';
$zz .= 'Email: [' .$email. ']';
echo $zz;
die();

Next, make sure that your MySQL insertion is working. Strip the code down to only 3 or 4 essential fields, run a test, and check the database. Did any data go in? Then, build it up and make sure an entire record enters correctly.

Finally, once you are sure that the previous two are working perfectly, then add in the code for your prayment processor.

2

solved How to post form value to url and database using php [closed]