The forums have permanently moved to forum.kirupa.com. This forum will be kept around in read-only mode for archival purposes. To learn how to continue using your existing account on the new forums, check out this thread.


Results 1 to 2 of 2

Thread: [PHP] Flash vars to PHP to URL..

  1. #1

    [PHP] Flash vars to PHP to URL..

    Not an easy question or maybe its really easy.

    I have to URL post form variables to a web address.

    Original HTML code [Works]

    HTML Code:
    <form action="http://somewebsite.com/webpush/webpush" action="POST">
    
            Modtager: <input type="text" name="sender">
            <br>
            Besked: <input type="text" name="personal_message">
            <br>
            <input type="radio" name="webpush" value="11">SMALL
            <br>
            <input type="radio" name="webpush" value="12">MEDIUM
            <br>
            <input type="radio" name="webpush" value="13">X-LARGE
            <br>
    
            <input type="radio" name="webpush" value="14">XXX-LARGE
            <br>
            <input type="hidden" name="message" value="[personal_message] has sent you a message.">
            <input type="submit" value="Send" />
        </form>
    AS code that works inside flash [works]
    Code:
    on (release) {
    
        data_lv = new LoadVars();
        data_lv.sender = s_mess.s_film.sender;
        data_lv.personal_message = s_mess.s_film.personal_message;
        data_lv.webpush = s_mess.s_film.webpush;
        data_lv.message = s_mess.s_film.message;
        data_lv.onLoad = function (ok)
        {
             if (ok)
             {
                  trace("Transaction success...");
             }
             else
             {
                  trace("Error...");
             }
        }
        data_lv.sendAndLoad("http://somewebsite.com/webpush/webpush", data_lv, "POST");
        
        }
    AS code to php [Should work]

    Code:
    data_lv.sendAndLoad("post.php", data_lv, "POST");
    Here is the big problem I think. I want the php file to send this string.

    http://somewebsite.com/webpush/webpush?sender=555123456
    &personal_message=Name&webpush=13
    &message=%5Bpersonal_message%5D+has+sent+you+a+mes sage.

    Here is my php code [not working]

    PHP Code:
    <?php
    $get_vars 
    '?';
    foreach(
    $_POST as $key=>$val) {
        
    $get_vars .= $key.'='.urlencode($val).'&';
    }
    $url 'http://somewebsite.com/webpush/webpush'.$get_vars;
    header('location: '.$url);

    ?>
    please help me??????

  2. #2
    Problem solved using crossdomain xml file and no PHP

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012