CF variable to PHP script

Situation:
My main site is coded in CF. My forum is coded in php. I am
in the process of creating a single uniform log in and don't want
to pass the log in information retrieved by CF via URL. I know
passing by session is out the picture, and I'm not trying to repost
by form, so I was thinking about using a cookie to store the
infomation and then destroying it after log in.
Question:
What is the safest way to pass a cf variable to php?

All the data is on the same database, just that one set of
tables I created myself and the other set was created dynamically
by the forum's set up script.
So far I pull the members info for log in on the primary site
(via email & password). In doing so, I pull the members
username (not id as previously mentioned), and now need to use the
stored username and password to log into the forum.
Just saw your responce Dan, I'll give that a try. Thanks. And
you too Mike.

Similar Messages

  • Concat Variables from php script

    Hi everyone !
    Here is my problem,
    My php script return me something like :
    Town1='blabla'&Town2='bloublou' etc...
    I'd like to add each town (loaded by LoadVars) in a ComboBox.
    here is my script (in AS2) :
    for (i=0; i<_root.tab_result.liste_lenght; i++) {
    myCB.addItem(_root['tab_result.ville'+i],_root['tab_result.ville'+i]);
    But i don't manage to concat the first part of the variable
    name 'Town' and the value of i !
    If somebody could help me ... :D thanks a lot.
    Ps if it can help here is the result of
    _root.tab_result.toString()...
    ville30=%27VERNEUIL%2DSUR%2DSERRE%27&ville29=%27VAUCELLES%2DET%2DBEFFECO%27&ville28=%27URC EL%27&ville27=%27ROYAUCOURT%2DET%2DCHAILV%27&ville26=%27PARGNY%2DFILAIN%27&ville25=%27MONT BAVIN%27&ville24=%27MONS%2DEN%2DLAONNOIS%27&ville23=%27MONAMPTEUIL%27&ville22=%27MOLINCHAR T%27&ville21=%27MERLIEUX%2DET%2DFOUQUERO%27&ville20=%27LIERVAL%27&ville19=%27LAON%27&ville 18=%27LANISCOURT%27&ville17=%27FILAIN%27&ville16=%27ETOUVELLES%27&ville15=%27CLACY%2DET%2D THIERRET%27&ville14=%27CHIVY%2DLES%2DETOUVELLES%27&ville13=%27CHEVREGNY%27&ville12=%27CHER Y%2DLES%2DPOUILLY%27&ville11=%27CHERET%27&ville10=%27CHAVIGNON%27&ville9=%27CHAMBRY%27&vil le8=%27CHAILLEVOIS%27&ville7=%27BUCY%2DLES%2DCERNY%27&ville6=%27BRIE%27&ville5=%27BRAYE%2D EN%2DLAONNOIS%27&ville4=%27BOURGUIGNON%2DSOUS%2DMON%27&ville3=%27BARENTON%2DCEL%27&ville2= %27BARENTON%2DBUGNY%27&ville1=%27AULNOIS%2DSOUS%2DLAON%27&ville0=%27ARRANCY%27&liste%5Flen ght=31&envoi=precision&onLoad=%5Btype%20Function%5D

    Damn it i found :D
    i had to write :
    for (i=0; i<_root.tab_result.liste_lenght; i++) {
    myCB.addItem(_root.tab_result['ville'+i],_root.tab_result['ville'+i]);
    I just hope it could help someone else ahahha
    Bye ;)
    Séb.

  • How do I enable Data Management if Passing an extra variable to PHP script?

    Im trying to use dynamic SQL tables on my PHP server so I need to pass the table name to the PHP script.  I don't understand why the Data Management system that sets up CRUD won't allow this extra parameter.  It says it can only have one input: item. I can get all records, but when I try to create, update, or delete I get an error.
    Or is there another way I can pass the tablename variable to the php file before I call any functions?
    Thanks!

    I use it but does not work for me.
    It does not integrates.
    You can tag on url value pairs onto your php function call such as:
    http://www.yourpath.php?tablename=tablenamesears
    You can then extract tablename, by using get in your php script:
    $tn = $_GET['tablename'];
    This $tn can be used anywhere in your php script as a dynamic value for table targeting.
    You can pass as many value pairs as you wish, every preceding pair must be in the form:
    http://www.yourpath.php?tablename=tablename&action=update&author=admin
    Hope it helps

  • Passing variable to PHP script

    Hi,
    I'm new to Oracle&APEX...
    I would like to upload a file to server filesystem, but I could not fid a way this to be done via APEX?
    (I somebody can give me a solution You are welcome)
    I know how this could be done in PHP so I created a script, but I need then to confirm to the database that the file is uploaded. To do this I need to have variable transferred to my PHP script.
    I've tried to build a button to pass the value with ?var=:P5_value, but only "P%_value" is passed as text not the value of this variable.
    How this can be done?
    Any suggestions?

    Hello,
    You should use the webdav functionality in XE.
    http://daust.blogspot.com/2006/03/where-are-images-of-application.html
    then you get the best of both worlds you get files in the database but they can be accessed as if they are in the filesystem.
    Note: APEX need to be replaced with HTMLDB for Oracle XEI have no idea what you are saying here, HTMLDB and APEX are the same thing.
    Carl

  • URLLoader with variables to php script

    looking for an example of coding URLLoader / URLRequest with POST variables to a php script and back. Can this be adequately tested using WAMP locally?

    var urlloader:URLLoader=new URLLoader();
    var urlR:URLRequest=new URLRequest("yourphpscript.php");
    var urlVar:URLVariables=new URLVariables();
    urlVar.var1="whatever";
    urlR.data=urlVar;
    urlR.method = URLRequestMethod.POST;
    urlloader.dataFormat = URLLoaderDataFormat.TEXT;
    urlloader.addEventListener(Event.COMPLETE, completeF);
    urlloader.load(urlR);
    function completeF(e:Event):void {
    trace(urlloader.data);

  • Question about PHP scripting

    i just did a PHP script for a web form, it works fine that
    when i press submit, it displays the page said "thanks for
    submitting," but the problem is i never receive the email of the
    data, any idea?

    I agree with GarryCT that you should try a simple test (no
    HTML) to see
    if you can send mail at all. If that succeeds, then try
    building it up
    to the point you're hoping for.
    When sending HTML mail, you /might/ want to consider
    including a plain
    text version and sending multi-part email.
    Anyway, here are some comments I have for the code posted
    here:
    Try
    temporarily turning on display errors.
    > <?php
    ini_set('error_reporting', E_ALL);
    ini_set('display_errors', 1);
    > /*subject and email variables*/
    > $subject = 'php scripting';
    > $me = 'my email';
    > /*gathering data variables*/
    > $name1 = $_POST ['name1'];
    > $name2 = $_POST ['name2'];
    > $email = $_POST ['email'];
    > $company = $_POST ['company'];
    > $brief = $_POST ['brief'];
    >
    > $body = <<<EOD
    > <br><HR><br>
    > First Name: $name1 <br>
    > Last Name: $name2 <br>
    > E-mail Address: $email <br>
    > Company: $company <br>
    > Brief: $brief <br>
    > EOD;
    Hopefully, that indent was caused by the Web forum.
    Otherwise, EOD;
    should be at the very start of the line - no white space[1].
    EOD;
    > $headers = "From: $mail\r\n";
    You have not assigned a value to $mail. Some hosts require
    this to be
    an address in your domain. Try using your $me variable here
    (assuming
    it is a valid email address from this domain).
    > $headers .= "Content-type: text /html\r\n";
    Try removing that extra space. You might also need to add
    mime
    version[2]. Does order make a difference? Try this for the
    $headers
    variable:
    $headers = 'MIME-Version: 1.0' . "\r\n";
    $headers .= 'Content-type: text/html; charset=iso-8859-1' .
    "\r\n";
    $headers .= "From: $me\r\n";
    > $success = mail($me, $subject, $body, $headers);
    You are not acting on the TRUE/FALSE result stored in
    $success.
    Everything after this point assumes mail was accepted for
    delivery. Of
    course, TRUE does not necessarily mean the mail actually got
    to its
    intended destination[2], FALSE does indicate that it was not
    delivered
    at all.
    > /*results rendered as HTML*/
    > $theResults = <<<EOD
    > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN"
    > "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    > <html xmlns="
    http://www.w3.org/1999/xhtml">
    > <head>
    > <meta http-equiv="Content-Type" content="text/html;
    charset=utf-8" />
    > <title>Untitled Document</title>
    > </head>
    > <body>Thanks for your time, we'll get back to you
    within a day.
    > </body>
    > </html>
    > EOD;
    Hopefully, that indent was caused by the Web forum.
    Otherwise, EOD;
    should be at the very start of the line - no white space[1].
    EOD;
    > echo "$theResults";
    > ?>
    [1]
    http://php.net/echo (see "here
    document" in examples.)
    [2]
    http://php.net/function.mail
    Mark A. Boyd
    Keep-On-Learnin' :)

  • PHP script...where do I put my variables???

    I'm working on a PHP script and I've got the fill in parts working but just cannot get my head around the drop down menu and radio buttons.  I tried typing in the drop down menu pieces in the "$body" part of it but then all it did was send me everything.  If the sender only wants one thing from the drop down menu, I only want to see what the customer wanted.  Not what is in all the menu.  From email to phone seems to work good but I guessed at the pull down "service menu" and also the Name through Comments works in the body portion as well but those pull down and radio parts are not sending.  I don't even know what an EOD is and what to type in there or the results part as well.  Please help!!
    <?php
    /* Email Variables */
    $emailSubject = 'contactformprocess.php';
    $webMaster = '[email protected]';
    /* Data Variables */
    $email = $_POST['email'];
    $name = $_POST['name'];
    $comments = $_POST['comments'];
    $phone = $_POST['phone'];
    $service = $_POST['Web Design'];
    $budget = $_POST['RadioGroup1_0'];
    $body = <<<EOD
    <br><hr><br>
    Name: $name <br>
    Email: $email <br>
    Phone: $phone <br>
    Comments: $comments <br>
    EOD;
    $headers = "From: $email\r\n";
    $headers .= "Content-type: text/html\r\n";
    $success = mail($webMaster, $emailSubject, $body,
    $headers);
    /* Results rendered as HTML */
    $theResults = <<<EOD
    <html>
    <head>
    <title>sent message</title>
    <meta http-equiv="refresh" content="2;URL=http://thegoldenspindle.com/Contact.html">
    <style type="text/css">

    Ok, here's the full script:  and the contact page is  http://thegoldenspindle.com/Contact.html    The red is what I added that makes the whole script not send or work.  I take them out and the script works again. 
    <?php
    /* Email Variables */
    $emailSubject = 'contactformprocess.php';
    $webMaster = '[email protected]';
    /* Data Variables */
    $email = $_POST['email'];
    $name = $_POST['name'];
    $comments = $_POST['comments'];
    $phone = $_POST['phone'];
    $service = $_POST['service'];
    $budget = $_POST['budget'];
    $body = <<<EOD
    <br><hr><br>
    Name: $name <br>
    Email: $email <br>
    Phone: $phone <br>
    Service: $service <br />
    Budget: $budget <br />
    Comments: $comments <br>
    EOD;
    $headers = "From: $email\r\n";
    $headers .= "Content-type: text/html\r\n";
    $success = mail($webMaster, $emailSubject, $body,
    $headers);
    /* Results rendered as HTML */
    $theResults = <<<EOD
    <html>
    <head>
    <title>sent message</title>
    <meta http-equiv="refresh" content="2;URL=http://thegoldenspindle.com/Contact.html">
    <style type="text/css">
    <!--
    body {
    background-color: #000000;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 20px;
    font-style: normal;
    line-height: normal;
    font-weight: normal;
    color: #fec001;
    text-decoration: none;
    padding-top: 200px;
    margin-left: 150px;
    width: 800px;
    -->
    </style>
    </head>
    <div align="center">Thank you for your email.  You will be contacted a soon as possible!</div>
    </div>
    </body>
    </html>
    EOD;
    echo "$theResults";
    ?>
    OK, here is my Contact Page script as well if this helps. 
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
    <title>Contact The Golden Spindle</title>
    <style type="text/css">
    <!--
    body {
    background-color: #000;
    background-image: url(Background-BLACK.jpg);
    background-repeat: repeat;
    margin-left: 0%;
    margin-right: 0%;
    margin-top: 0%;
    margin-bottom: 0%;
    body,td,th {
    font-size: x-small;
    color: #FFF;
    a:link {
    color: #E8E8E8;
    margin: 0px;
    text-decoration: none;
    a:visited {
    text-decoration: none;
    color: #E8E8E8;
    a:hover {
    color: #9DF99B;
    cursor: auto;
    filter: Invert;
    text-decoration: none;
    a:active {
    text-decoration: none;
    color: #930;
    .style32 {
    font-size: x-large;
    text-transform: none;
    .style33 {
    font-size: large;
    font-family: Arial, Helvetica, sans-serif;
    .style35 {
    font-family: Arial, Helvetica, sans-serif;
    color: #FFF;
    .style36 {font-size: small; font-family: Arial, Helvetica, sans-serif; }
    .style39 {font-size: small}
    .style47 {font-size: x-large;
    color: #c7a317;
    .style48 {font-size: large;
    font-family: Arial, Helvetica, sans-serif;
    color: #BBBBBB;
    .style49 { color: #c7a317;
    font-size: small;
    .style153 {
    font-size: 14px;
    color: #F2E69A;
    font-family: Arial, Helvetica, sans-serif;
    .style154 {
    font-size: 15px;
    color: #F2E69A;
    font-family: Arial, Helvetica, sans-serif;
    .style157 {color: #726D49}
    .style158 {font-size: 12px}
    .style159 {font-family: Arial, Helvetica, sans-serif; color: #F2E69A;}
    .style40 {color: #BBBBBB}
    .style56 {color: #F2E69A}
    .style65 {font-family: Arial, Helvetica, sans-serif;
    font-weight: bold;
    font-size: 14px;
    font-style: italic;
    #MenuBar1 li .goldensettings.MenuBarItemSubmenu .goldensettings {
    font-size: 16px;
    #MenuBar1 li .MenuBarSubmenuVisible li {
    font-size: 0px;
    #MenuBar1 li .MenuBarSubmenuVisible li {
    font-size: 16px;
    color: #3CC;
    #y {
    font-size: 0px;
    #box {
    font-size: 2px;
    #Box2 {
    font-size: 2px;
    #box3 {
    font-size: 2px;
    #box4 {
    font-size: 2px;
    #box5 {
    font-size: 2px;
    #box6 {
    font-size: 2px;
    #box7 {
    font-size: 2px;
    #box8 {
    font-size: 2px;
    #box9 {
    font-size: 2px;
    #box10 {
    font-size: 2px;
    #box11 {
    font-size: 1.2px;
    #box12 {
    font-size: 1.2px;
    #box14 {
    font-size: 1.2px;
    #box16 {
    font-size: 1.2px;
    #box17 {
    font-size: 1.2px;
    #box18 {
    font-size: 1.2px;
    #box20 {
    font-size: 1.2px;
    #box21 {
    font-size: 1.2px;
    #box22 {
    font-size: 1.2px;
    #bx1 {
    font-size: 5x-small;
    #x {
    font-size: 1px;
    #x1 {
    font-size: 1px;
    #bx3 {
    font-size: 1px;
    #bx6 {
    font-size: 1px;
    #bx6 {
    font-size: 1px;
    #bx7 {
    font-size: 1px;
    #bx8 {
    font-size: 1px;
    #bx9 {
    font-size: 1px;
    #MenuBar1 li .MenuBarSubmenuVisible li a {
    font-family: Arial, Helvetica, sans-serif;
    #MenuBar1 li .MenuBarSubmenuVisible li a {
    font-family: Arial, Helvetica, sans-serif;
    #MenuBar1 li a {
    font-family: Arial, Helvetica, sans-serif;
    -->
    </style>
    <style type="text/css">
    <!--
    .style351 {font-family: Arial, Helvetica, sans-serif}
    -->
    </style>
    <style type="text/css">
    <!--
    .style156 {font-size: 15px;
    color: #F2E69A;
    font-family: Arial, Helvetica, sans-serif;
    .none {
    color: #CCC;
    -->
    </style>
    <script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
    <link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
    <link href="SpryAssets/SpryMenuBarVertical.css" rel="stylesheet" type="text/css" />
    </head>
    <body link="#33CC66" alink="#FFFFFF">
    <blockquote>
      <blockquote>
        <table width="547" border="0" align="center">
          <tr>
            <th width="541" height="93" bordercolor="#000000" scope="col"><div align="left" class="style32">
                <table width="541" height="68" border="0" align="center" cellspacing="0" bordercolor="0">
                  <tr>
                    <th width="531" height="66" scope="col"><img src="Golden-Spindle-LOGO.png" width="512" height="218" /></th>
                  </tr>
                </table>
            </div></th>
          </tr>
        </table>
      </blockquote>
    </blockquote>
    <table width="1073" height="40" border="1" align="center" cellspacing="0" bordercolor="#1F252D" background="Blue-Bar-Flame008.png">
      <tr>
        <th width="1067" height="36" align="center" valign="middle" scope="col"><table width="912" border="0" align="center">
          <tr>
            <td width="906" align="center" scope="col"><ul id="MenuBar1" class="MenuBarHorizontal">
              <li>
                <div align="center"><a href="index.html">HOME</a></div>
              </li>
              <li><a href="#" class="MenuBarItemSubmenu">SERVICES</a>
                <ul>
                  <li><a href="#" class="MenuBarItemSubmenu">3D Texturing</a>
                    <ul>
                      <li><a href="3D Texturing.html">Stills</a></li>
                      <li><a href="Electroplating.html">Electroplating</a></li>
                      <li><a href="Hologram.html">Holograms</a></li>
                    </ul>
                  </li>
                  <li><a href="3D Composite.html">3D Composite</a></li>
                  <li><a href="#" class="MenuBarItemSubmenu">Water</a>
                    <ul>
                      <li><a href="Ocean.html">Ocean</a></li>
                      <li><a href="Fluid Reactions.html">Fluid Reactions</a></li>
                    </ul>
                  </li>
                  <li><a href="#" class="MenuBarItemSubmenu">2D Work</a>
                    <ul>
                      <li><a href="Composites.html">Composite</a></li>
                      <li><a href="Face Morphing.html">Face Replacement</a></li>
                      <li><a href="Photo Restore.html">Photo Restoring</a></li>
                      <li><a href="Touchups.html">Touch Ups</a></li>
                      <li><a href="2D Animation.html">2D Animation</a></li>
                    </ul>
                  </li>
                  <li><a href="#" class="MenuBarItemSubmenu">Visual Effects</a>
                    <ul>
                      <li><a href="Chroma Key.html">Chroma Key</a></li>
                    </ul>
                  </li>
                  <li><a href="Video Editing.html" class="goldensettings">Video Editing</a></li>
                  <li><a href="#" class="MenuBarItemSubmenu">Cloth &amp; Materials</a>
                    <ul>
                      <li><a href="Flag Blowing.html">Flag</a></li>
                    </ul>
                  </li>
                  <li><a href="#" class="MenuBarItemSubmenu">Ad Design</a>
                    <ul>
                      <li><a href="Brochures.html">Brochures</a></li>
                      <li><a href="Magazine.html">Magazine</a></li>
                      <li><a href="Box Design.html">Box &amp; Print</a></li>
                      <li><a href="Infomercial.html">Infomercials</a></li>
                    </ul>
                  </li>
                  <li><a href="Logos.html">Company Logos</a></li>
                  <li><a href="#" class="MenuBarItemSubmenu">Planets &amp; Space</a>
                    <ul>
                      <li><a href="Earth.html">Earth</a></li>
                      <li><a href="Planets &amp; Space.html">Moon</a></li>
                    </ul>
                  </li>
                  <li><a href="#" class="MenuBarItemSubmenu">Camera Techniques</a>
                    <ul>
                      <li><a href="Nasa Cam.html">NASA cam</a></li>
                      <li><a href="Hand Cam earth.html">Hand Cam</a></li>
                    </ul>
                  </li>
                  <li><a href="Graphics &amp; Webdesign.html">Web Design</a></li>
                  <li><a href="Business Cards.html">Business Cards</a></li>
                </ul>
              </li>
              <li><a href="REEL.html">DEMO REEL</a></li>
              <li><a href="Graphics &amp; Webdesign.html">WEB DESIGN</a></li>
              <li><a href="Animation.html">ANIMATION</a></li>
              <li><a href="Contact.html">CONTACT ME</a></li>
            </ul></td>
          </tr>
        </table></th>
      </tr>
    </table>
    <br />
    <table width="1073" border="0" align="center" cellspacing="0">
      <tr>
        <td align="right"><img src="Labels-Contact-video.png" alt="" width="497" height="19" /></td>
      </tr>
    </table>
    <br />
    <br />
    <form id="form2" name="form2" method="post" action="contactformprocess.php">
      <table width="1166" height="167" border="0" align="center" cellpadding="4" cellspacing="0">
        <tr>
          <td width="211" align="right"><label for="name">Name:</label></td>
          <td width="933"><input name="name" type="text" id="name" size="35" maxlength="80" /></td>
        </tr>
        <tr>
          <td align="right"><label for="email2">Email:</label></td>
          <td><input name="email" type="text" id="email2" size="35" maxlength="90" /></td>
        </tr>
        <tr>
          <td height="25" align="right"><label for="phone">Phone:</label></td>
          <td><input name="phone" type="text" id="phone" size="35" maxlength="12" /></td>
        </tr>
        <tr>
          <td height="22" align="right"><label for="Service Needed:">Service Needed:</label></td>
          <td><input name="Service Needed:" type="text" id="Service Needed:" size="35" maxlength="35" /></td>
        </tr>
        <tr>
          <td height="4" align="right">Budget:</td>
          <td><input name="Budget:" type="text" id="Budget:" size="35" maxlength="50" /></td>
        </tr>
        <tr>
          <td height="5" align="right"><label for="comments">Comments:</label></td>
          <td><textarea name="comments" id="comments" cols="33" rows="5"></textarea></td>
        </tr>
        <tr>
          <td height="13" align="right"><label for="clear"></label>
          <input type="reset" name="clear" id="clear" value="Reset Form" /></td>
          <td align="left"><label for="submit"></label>
          <input type="submit" name="submit" id="submit" value="Submit" /></td>
        </tr>
        <tr>
          <td> </td>
          <td align="right"> </td>
        </tr>
      </table>
    </form>
    <p><br />
    </p>
    <table width="391" height="20" border="0" align="center" bordercolor="#000000">
      <tr>
        <th width="381" scope="col"><div align="left" class="style351">
          <div align="center"><a href="About me.html">About Me</a><a href="REEL.html"></a> | <a href="Graphics &amp; Webdesign.html">Graphic &amp; Web Design</a> | <a href="Animation.html">Animation</a> | <a href="Video Editing.html">Video Editing</a> | <a href="Resume Video.pdf">Video Resume</a></div>
        </div></th>
      </tr>
    </table>
    <table width="422" height="36" border="0" align="center" bordercolor="#000000">
      <tr>
        <th width="412" height="30" scope="col"><div align="left" class="style351">
          <div align="center"><span class="style40"><a href="Contact.html">Contact</a> | Leavenworth, KS  | [email protected]<br />
          </span></div>
          <span class="style40">
            <label></label>
            </span>
          <div align="center" class="style40">&copy; 2009 The Golden Spindle, LLC. All Rights Reserved. </div>
        </div></th>
      </tr>
    </table>
    <p> </p>
    <script type="text/javascript">
    <!--
    var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
    //-->
    </script>
    </body>
    </html>

  • Retrieving a session variable from a php script and putting it in an applet

    I have a chat applet and i'm trying to have a session variable in one my php scripts be setted onto the user area of my chat. Would it start out by doing this?
    <object codetype="application/java"
    code = "ClientApplet.class"
    width = "300"
    height = "400"
    classid = "the name of the session variable">
    </object>

    No.
    Use the parameter tags.

  • Strange variables retrieved from php script

    Hi,
    I am experiencing a really strange thing when making my flash
    movie communicate with a php script.
    No matter what the animation is doing, just consider the
    following :
    see code below
    ticket is the object which receives the response from server
    which returns
    echo utf8_encode("reponse=ok")
    Each time when I run it , (ticket.retour.toString() != "ok")
    returns true, and the redirection url shows the following :
    http://xx.yy.zz.uu/jeu_avertissement.php?type=PROBLEME_CONNECTION&retour=ok&d=0.02&u=1&k=7 39f4db19af87cc0f2b72a6f63698500
    showing value of my retour var which is equal to .... ok
    I really don't understand! Could anybody explain me what
    happened. It looks like I saw a UFO.
    Thanks in advance,
    Pascal

    Damn it i found :D
    i had to write :
    for (i=0; i<_root.tab_result.liste_lenght; i++) {
    myCB.addItem(_root.tab_result['ville'+i],_root.tab_result['ville'+i]);
    I just hope it could help someone else ahahha
    Bye ;)
    Séb.

  • Flex application works locally, fails when online (connecting to PHP script to insert row into DB)

    Hi everyone,
    I've got a Flex application that works wonderfully when I test it on my machine locally. It uploads files and send variables to a PHP script (that inserts them into a DB) with no errors when I run it locally. As soon as I put it online, the upload continues to work but something between my Flex application and the PHP script fails because no data is committed to the DB. I know the PHP script works fine - not only does it work when I run the Flex application locally but when I go directly to the PHP file online, a new empty line is added to the DB.
    I initially thought that this was a cross domain issue so I added the following to the root of my hosted account:
    <cross-domain-policy>
    <site-control permitted-cross-domain-policies="all"/>
    <allow-access-from domain="*.MYURL"/>
    <allow-http-request-headers-from domain="*.MYURL" headers="*" secure="false"/>
    </cross-domain-policy>
    I based this off of what I found online which seems to have done nothing for me. I'd also be happy to provide an error message but I don't get one when I debug.
    Any thoughts would be greatly appreciated.

    Use a network monitor to see if the Flex app is truly requesting the right URL.
    -Alex

  • How to send file as a parameter to php script

    Hi,
    Can any body help me to send the file as a parameter to php script. I am using the HttpURLConnection method.
    Thank

    String msg= "name=" + strName + "&surname=" + strSurname;
                   byte[] msgAsBytes = msg.getBytes();
    I am able to pass the string to the php script as
    URLConnection con = url.openConnection();          
              ((HttpURLConnection) con).setRequestMethod("POST");
              con.setDoOutput(true);
              con.setDoInput(true);
              con.setUseCaches(false);     
    OutputStream oStream = con.getOutputStream();
                   oStream.write(msgAsBytes);
                   oStream.flush();and in php, i store into the global variable and it work fine
    if(isset($_POST['name' ]&&isset($_POST[' surname'])it works fine for me. But problem is with the file. How can I send the file to php. Please help me. Thanks

  • Calling stored procedure from php script.

    I have the following stored procedure in Oracle 8:
    CREATE OR REPLACE procedure kunde_create
    (iname1 in varchar2,
    iname2 in varchar2,
    iname3 in varchar2,
    ianrede in number,
    istrasse in varchar2,
    iland varchar2,
    iplz in varchar2,
    iort in varchar2,
    iortsteil in varchar2,
    itelefon in varchar2,
    iemail in varchar2,
    itelefax in varchar2,
    imobil in varchar2,
    ianrufer in varchar2,
    izusinfo in varchar2,
    izusatz2 in varchar2,
    okdnr out varchar2)
    is
    vkndnr number;
    vadrnr number;
    vkdnr varchar2(15);
    ikugru constant number:=4;
    minkdnr constant varchar2(15):='44000000';
    maxkdnr constant varchar2(15):='50000000';
    begin
    ..... SOME CODE ....
    okdnr:='something_to_output';
    commit;
    end kunde_create;
    I am trying to call this SP from a php script, in this way:
    $connection = ora_logon("username@db", "password");
    $cursor = ora_open($connection);
    ora_commitoff($connection);
    $cu=ora_parse($cursor, "begin KW.kunde_create ( :Sta_nameD, :Sta_name2D, :Sta_kugruD, :ianredeD, :Sta_straD, :Sta_landD, :Sta_plzD, :Sta_ortD, :Sta_ortsteilD, :Sta_telD, :Sta_mailD, :Sta_faxD, :Sta_tel2D, :Sta_anruD, :Sta_zusD, :Sta_zus2D ,:okdnr); end;");
    ora_bind($cursor, ":Sta_nameD", $Sta_nameD, 32, 1);
    ora_bind($cursor, ":Sta_name2D", $Sta_name2D, 32, 1);
    ora_bind($cursor, ":ianredeD", $ianredeD, 32, 1);
    ora_bind($cursor, ":Sta_straD", $Sta_straD, 32, 1);
    ora_bind($cursor, ":Sta_landD", $Sta_landD, 32, 1);
    ora_bind($cursor, ":Sta_plzD", $Sta_plzD, 32, 1);
    ora_bind($cursor, ":Sta_ortD", $Sta_ortD, 32, 1);
    ora_bind($cursor, ":Sta_ortsteilD", $Sta_ortsteilD, 32, 1);
    ora_bind($cursor, ":Sta_telD", $Sta_telD, 32, 1);
    ora_bind($cursor, ":Sta_mailD", $Sta_mailD, 32, 1);
    ora_bind($cursor, ":Sta_faxD", $Sta_faxD, 32, 1);
    ora_bind($cursor, ":Sta_tel2D", $Sta_tel2D, 32, 1);
    ora_bind($cursor, ":Sta_anruD", $Sta_anruD, 32, 1);
    ora_bind($cursor, ":Sta_zusD", $Sta_zusD, 32, 1);
    ora_bind($cursor, ":Sta_zus2D", $Sta_zus2D, 32, 1);
    ora_bind($cursor, ":okdnr", $okdnr, 32, 2);
    ora_exec($cursor); //Line 93
    This code brings me back this error:
    Warning: Can't find variable for parameter in /www/vaillant/htdocs/www_tisweb/html/php/testdb/connect.php on line 93
    I tried nearlly everything, but it doesnt work :(
    Can anybody help me please.
    Thanx in advance,
    Ahmed Adaileh

    I had to make a few modifications to get your example to work. The
    biggest change was to the ora_bind syntax. I also found I had to
    define a variable to hold the OUT value before doing the ora_exec.
    Otherwise I got the error you saw. I'm not sure why defining it first
    is necessary. I didn't dig deeply into PHP's oracle.c code.
    My final script is below. It displays "okdnr is something_to_output".
    I tested using PHP 4.3.3 against Oracle 9.2.
    The best general suggestion I can make is to use PHP's oci8 driver
    unless you need to be compatible with existing PHP code. There is an
    example of using OUT binds in oci8 to call a stored procedure at
    PHP and serveroutput
    -- CJ
    <?php
    // Changed connection details to suit my environment
    $connection = ora_logon("scott@MYDB", "tiger");
    $cursor = ora_open($connection);
    ora_commitoff($connection);
    // Changed schema to SCOTT to match who I'd created the procedure as
    $cu=ora_parse($cursor, "begin SCOTT.kunde_create ( :Sta_nameD, :Sta_name2D, :Sta_kugruD, :ianredeD, :Sta_straD, :Sta_landD, :Sta_plzD, :Sta_ortD, :Sta_ortsteilD, :Sta_telD, :Sta_mailD, :Sta_faxD, :Sta_tel2D, :Sta_anruD, :Sta_zusD, :Sta_zus2D ,:okdnr); end;");
    // Allocated the IN parameter variables
    $Sta_nameD      = 'a';
    $Sta_name2D     = 'a';
    $ianredeD       = 1;
    $Sta_straD      = 'a';
    $Sta_landD      = 'a';
    $Sta_plzD       = 'a';
    $Sta_ortD       = 'a';
    $Sta_ortsteilD  = 'a';
    $Sta_telD       = 'a';
    $Sta_mailD      = 'a';
    $Sta_faxD       = 'a';
    $Sta_tel2D      = 'a';
    $Sta_anruD      = 'a';
    $Sta_zusD       = 'a';
    $Sta_zus2D      = 'a';
    $Sta_kugruD     = 'a';
    // Changed ora_bind syntax to match
    // http://www.php.net/manual/en/function.ora-bind.php
    ora_bind($cursor, "Sta_nameD", ":Sta_nameD", 32, 1);
    ora_bind($cursor, "Sta_name2D", ":Sta_name2D", 32, 1);
    // Change ianredeD type to 2 to match procedure definition
    ora_bind($cursor, "ianredeD", ":ianredeD", 32, 2);
    ora_bind($cursor, "Sta_straD", ":Sta_straD", 32, 1);
    ora_bind($cursor, "Sta_landD", ":Sta_landD", 32, 1);
    ora_bind($cursor, "Sta_plzD", ":Sta_plzD", 32, 1);
    ora_bind($cursor, "Sta_ortD", ":Sta_ortD", 32, 1);
    ora_bind($cursor, "Sta_ortsteilD", ":Sta_ortsteilD", 32, 1);
    ora_bind($cursor, "Sta_telD", ":Sta_telD", 32, 1);
    ora_bind($cursor, "Sta_mailD", ":Sta_mailD", 32, 1);
    ora_bind($cursor, "Sta_faxD", ":Sta_faxD", 32, 1);
    ora_bind($cursor, "Sta_tel2D", ":Sta_tel2D", 32, 1);
    ora_bind($cursor, "Sta_anruD", ":Sta_anruD", 32, 1);
    ora_bind($cursor, "Sta_zusD", ":Sta_zusD", 32, 1);
    ora_bind($cursor, "Sta_zus2D", ":Sta_zus2D", 32, 1);
    // Changed okdnr type to 1 to match procedure definition
    ora_bind($cursor, "okdnr", ":okdnr", 32, 1);
    // Bound missing parameter
    ora_bind($cursor, "Sta_kugruD", ":Sta_kugruD", 32, 1);
    // Preallocated the output variable - I'm not sure why this is
    // necessary nor what size is needed.
    // When this line is commented out I get:
    //   Warning: Can't find variable for parameter in test01.php on line XX
    $okdnr = "a";
    ora_exec($cursor);
    print "okdnr is $okdnr";
    ?>

  • Passing variable from php into flash, help please

    Here are what I'm having:
    <?PHP
    $testVal = "This is a test";
    $test = urlencode($testVal);
    $out = "test=". $testVal;
    echo $out;
    ?>
    // and this is my flash file
    function getData() {
    // Prepare request
    var urlReq:URLRequest=new URLRequest("http://localhost/test.php");
    urlReq.method=URLRequestMethod.GET;
    var loader:URLLoader = new URLLoader();
    loader.dataFormat=URLLoaderDataFormat.VARIABLES;
    loader.addEventListener(Event.COMPLETE, completeHandler);
    loader.load(urlReq);
    function completeHandler(evt:Event) {
    var vars:URLVariables = URLVariables(evt.target.data);
    trace(" TEST = ", vars.test);
    trace(" TEST = ", unescape(vars.toString()));
    // and below is the ouput
    TEST = undefined
    TEST = test=This is a test
    I've tried with several different ways to get ONLY the value of the variable - that means I only want to have "This is a test" returned, but I either got "undefined" or the whole thing "test=This is a test", instead.
    I'm new to Flash and PHP. Please help.
    Thanks

    There's no need to write any fake variables out, Flash does not need that. OK, here's a simple PHP script like yours - I called it test.php
    <?PHP
         $testVal = "This is a test";
         $out = "test=". $testVal;
         echo $out;
    ?>
    And the AS to call it:
    var myLoader:URLLoader = new URLLoader();
    myLoader.dataFormat = URLLoaderDataFormat.VARIABLES;
    myLoader.load(new URLRequest("http://www.mydomain.com/test.php"));
    myLoader.addEventListener(Event.COMPLETE, dataLoaded, false, 0, true);
    function dataLoaded(e:Event){  
        trace( e.target.data.test);
    You will see 'This is a test' traced to the output window.
    HTH

  • Creating a session variable with PHP

    Can anyone offer me a PHP script that creates a session
    variable? The Dreamweaver CS3 Help documentation offers coding
    samples for ColdFusion and ASP but not for PHP. I tried this
    without success:
    "$_SESSION['usermail']= $_POST['sub_email'];" in which I am
    trying to capture an email address from a form and save it to use
    in a confirmation email to a new subscriber. Any help would be
    sincerely appreciated.
    [email protected]

    I use this -
    <?php
    if (!isset($_SESSION)) {
    session_start();
    ?>
    at the top of the page, and then this within the code block
    where you are
    processing the form's data -
    $_SESSION['usermail']= $_POST['sub_email'];
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "Jugdish" <[email protected]> wrote in
    message
    news:gb8aov$691$[email protected]..
    > Can anyone offer me a PHP script that creates a session
    variable? The
    > Dreamweaver CS3 Help documentation offers coding samples
    for ColdFusion
    > and ASP
    > but not for PHP. I tried this without success:
    > "$_SESSION['usermail']= $_POST['sub_email'];" in which I
    am trying to
    > capture
    > an email address from a form and save it to use in a
    confirmation email to
    > a
    > new subscriber. Any help would be sincerely appreciated.
    > [email protected]
    >

  • Passing Session Variable from PHP to Applet

    I'm trying to pass a session variable from a PHP script to a third party applet. The applet needs to accept the variable as a string into a parameter. I think the htnl has to be dynamically created to turn the session variable into a string for the parameter value. Any suggestions ?

    This is really a PHP question. You might get better results on a PHP forum.

Maybe you are looking for

  • Download and play .MTS (HD pix from Sony DSC-TX10)in my i-Mac

    Hi everyone! I got stuck with this one. Is there any apple app I can use to dowload HD (.MTS files from Sony DSC-TX10) so as to be able to visualize them on my i-Mac? Many thanks! Daniel

  • Error Catching.

    I'm trying to pull in the local security policy on my servers and I'm running my script against all my servers.  For the most part all is fine but on some servers I get the following error message.  Can someone tell me what it means and is possible h

  • JCO error partner no reached

    Hello experts, I want to connect external java applications with my ERP 6.0 (ABAP stack). The JCO connector soft is installed in a separate server from SAP application server. When i try to establish the connection the result is: [10 jul 2008 10:41:4

  • ERROR when taking an export using EXPDP

    Hi There, I am receiving the following error when perform the scheduled nightly backup. The strange thing is the production instance has the same setup and it is not having this problem. The following parameters (memory_target, memory_max_target and

  • 4500X as collapsed core design

    We have 2 4500x switches with Ent Services licences.  The plan is to replace the current core routers with a L3 switched core using the 4500x with VSS.  The core will connect 3 building data closets, a local data center and 18 remote WAN sites.  Engi