Hi all,
I have a quick (newb) question. I'm using CFv3.2 and wondering how can I return/retrieve the uid of the record that has been inserted in the db? I'm planning to pass the uid to our payment gateway so that the payment gateway can retrieve the info from the db. When the user click on the submit button, they will be redirected to the payment gateway having all the fields pre-populated based on the info they have submitted using chrono forms.
Thanks
I have a quick (newb) question. I'm using CFv3.2 and wondering how can I return/retrieve the uid of the record that has been inserted in the db? I'm planning to pass the uid to our payment gateway so that the payment gateway can retrieve the info from the db. When the user click on the submit button, they will be redirected to the payment gateway having all the fields pre-populated based on the info they have submitted using chrono forms.
Thanks
After a few more poking around, instead of retrieving it, I decided to generate it and just pass it to the db and also to the payment gateway.
To generate the uid, I used the same code generated by the AutoGenerated Code and assign it to uid variable and use the value on a hidden field
then I just append the uid on the URL query string
To generate the uid, I used the same code generated by the AutoGenerated Code and assign it to uid variable and use the value on a hidden field
<?php
$uid = "I" . substr(base64_encode(md5(rand())), 0, 16).md5(uniqid(mt_rand(), true));
?>
...
...
...
<input type='hidden' name='uid' value='<?php echo $uid; ?>' />
then I just append the uid on the URL query string
This topic is locked and no more replies can be posted.