Everybody! This is important. In a few days, these forums will be moving over to using the totally sweet Discourse platform. To ensure this migration happens smoothly with no loss of content, these forums are currently in a read-only mode. I do apologize for the inconvenience.

There is never a good time to turn the forums off for an extended period of time, but I promise the new forums will be a billion times better. I'm pretty sure of it.

See you all on the other side in a few days, and if you have any (non-technical) questions, please e-mail me at kirupa@kirupa.com. For technical questions, try to find a tutorial that corresponds to what you are looking for and post in the comments section of that page.

Cheers,
Kirupa

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