A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: help with a php form

  1. #1
    Owner of the ™ thread tublu's Avatar
    Join Date
    Nov 2000
    Posts
    2,430

    help with a php form

    can someone help me in creating a simple PHP form ?
    i ned to create a form that will request some registration elements from the user and send it to me via email as well , post a few additional hidden elements to another form using post .

    Registration form example
    <form method="post" action="http://somesite.com/reg.php?n=123">
    <input type="hidden" name="reginfo" value="name: test-user.com; Username: testuser; Password: testpassword">
    <input type="hidden" name="regnumber" value="AB129831Q2782">
    <input type="hidden" name="comments" value="">
    <input type="hidden" name="callback" value="http://www.mysite.com/callback.php">
    <input type="submit" value="Proceed to Next Step">
    </form>
    any kind soul ?

  2. #2
    Junior Member
    Join Date
    Mar 2001
    Posts
    6
    to send mail use:

    <?

    $message = $reginfo."\n";
    $message .= $regnumber."\n";
    $message .= $comments."\n";
    $message .= $callback."\n";

    mail("[email protected]", "The Subject", $message);

    ?>
    hope this helps - theres more info at http://www.php.net

  3. #3
    You might find what you want with Phorm:
    www.phorm.com

    ed

  4. #4
    Owner of the ™ thread tublu's Avatar
    Join Date
    Nov 2000
    Posts
    2,430
    I did as a matter of fact , downloadPhorm ... btu it is just too much extra and unecessary ... neither it has got any fnction dealing with posting data/fields to another page ...if I saw correctly .

  5. #5
    Registered User
    Join Date
    Feb 2001
    Posts
    13,039
    Hi,

    not exactly sure what you want to do?
    You want your flash or html form to send data to your server, and your server script to send you mail AND send some variables to another server - or is it something else?

    Musicman

  6. #6
    Owner of the ™ thread tublu's Avatar
    Join Date
    Nov 2000
    Posts
    2,430
    I am trying to use Credit Card transaction on my site ... for that I am takng a 3rd party merchant account . For this I need the PHP form to send me some info for my Keeping records and some info ( the hiddent fields ) to the CC company's form ... based on which it will generate data on their Payment page . So the hiddent fields from my form should be sent using GET to their Form page .

  7. #7
    Registered User
    Join Date
    Feb 2001
    Posts
    13,039
    Hi,

    this might be easy ... or might be hard, depending on their setup.
    Here it is:
    your movie sends a request to your server with a GETURL method (you are expecting to load the payment company's form into a new browser window).
    Now the server creates a query string (this is GET method) and uses something like
    <?
    $fp = fopen("http://www.givemeyourmoney.com/?shop=abc&price=13.95&title=box+of+straws", "r");
    fpassthru($fp);
    ?>
    The data returned from the payment system (should be a form) is sent back to the visitor and will fill the new browser.
    Now, for the problems:
    a) if the payment form contains any relative links (e.g a nice jpeg image "Proceed" or links to their help pages), they will be interpreted as relative to your own server
    b) security: customers are said to expect secure servers to send credit card numbers (although they are willing to pay at restaurants where the card is taken to the back room). So far the visitor has received the form via an insecure channel. If the post address in the form is relative, the visitors card data will go to your server rather than theirs
    Even if you provide secure server yourself, if customer clicks on the "security" browser menu, they will see your site certificte rather than the payment company's

    Unless your payment system provides a different way of interacting, you should consider the following approach (and check with them whther it is possible): there is a return url where the customer is sent after paying. This can be an arbitrary script on your server, and it should be possible to pass it parmeters. So the details important for your records should be encoded into that return link

    Musicman

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center