Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    PHP


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Send A Simple Variable Like A Result From A Query To Flash?


How to send a simple variable like a result from a query to Flash?




View Complete Forum Thread with Replies

Related Forum Messages:
Form Input From Flash To Send Out Thru A Simple Mail() Script.
I posted a thread earlier about not being able to get some form input from flash to send out thru a simple mail() script. I managed to fix that. However, I'm back to my real problem. I can't get the mail() to send mail using this script on my dedicated server2003 machine:

PHP Code:

<?php
mail("me@myEmail.com", $_POST['subject'], $_POST['message'], "From: PHPMailer
Reply-To: " . $_POST['from'] . "
X-Mailer: PHP/" . phpversion());
?>

View Replies !
Send Mysql Query Result Displayed In A Table
I have just created a shopping cart and I would like to send my user the receipt of there order by email. The receipt is generated by a mysql query and is displayed within a table. I have worked out how to send a html using simple HTML code as my “$messageâ€&#65533; variable: $success = mail($to, $subject, $message, $headers);

But I can not get it to send my mysql query result displayed in a table. How can i create the result of my mysql query and make it a simple variable i.e $message.

View Replies !
Variable Interpolation From Sql Query Result
I have data in a MySQL table like:
the variable is: $var

and an assignment in a file like:
$var = "some text";

but when I print the output of a query for the data it prints:
the variable is: $var

rather than:
the variable is: some text

View Replies !
Simple Question: Query String Variable And More
suppose i have two html-formatted documents with appropriately coded <?php ?> areas.

a typical query is this: file.php?call=123.html

in 123.html i define a variable $doctitle

How can I display $doctitle in file.php (an html-formatted file as well)

View Replies !
Passing Variable From Flash To Php & Back From Php To Flash
I am looking for some help in passing variable from flash to php & back from php to flash.

View Replies !
Can't Send Flash To Php
i've followed every tutorial i've found on the net and i still can't get flash to send variables to a php script i make text input fields, i give them all instance and var names, i create a button and give it actionscript like this.

on (release) {
c = new LoadVars();
c.send("script.php", "_parent", "POST");
}

in the php page i type out all the script and have tried identifying the posted variables with both $_POST and $HTTP_POST_VARS. the php script is called but the variables are never passed. i know this because when i go.

if (isset($_POST['fieldname'])) { echo "yes"; }
else { echo "no"; }

View Replies !
Simple Flash Form With A Php Script
I have created a simple flash form for a website I am working on, I want to use a simple php script to actually send the email.  However I am a complete php noob and the script I have isn't working.  I would like someone to take a look at the page and the source and see if they can figure out where I am making my mistake. Code:

View Replies !
Send The Contents Of Flash Form Through PHP In Email
I want to send the contents of a form from Flash via PHP through email. Now I can do this fine when my email message 'body' is made from one variable, but for some reason when I try to gather multiple variables (from multiple fields in the form) and send these as the message body.

<?php
$sendTo = "enquiries@example.com";
$subject = "Website Quote Enquiry";
$headers = "From: " . $_POST["name"];
$headers .= "<" . $_POST["email"] . ">";
$headers .= "Reply-To: " . $_POST["email"] . "";
$headers .= "Return-Path: " . $_POST["email"];
$EcompName = $_POST["compName"];
$EcontName = $_POST["contName"];
$Eemail = $_POST["email"];
$Etel = $_POST["tel"];
$Edetails = $_POST["details"];

View Replies !
Send A HTML Line Of Code To A Flash File
I'm trying to send a HTML line of code to a flash file, but php is running it as html, instead of seeing it as plain text.

file.swf?name=<?php echo $code; ?>

I need to somehow echo the $code as plain text instead of php running the html.

View Replies !
Turn Select Query Result Into Hyperlink To Other Query
I have a query which gives results of selecting coursenames from a table called trainingtopics but this does so in a continuous bulk of text without any breaks between each record. my question how do I create line breaks between each record and also how can I force each query result to become a hyperlink which when clicked runs another query that gives details of that course.

<?php
$user = "root";
$host = "localhost";
$password = "";
$connection = mysql_connect($host, $root, $password) or die ("Couldn't connect to server.");
$database = "courses";
$db = mysql_select_db($database) or die ("Couldn't select database.");

$sql = "SELECT coursename FROM trainingtopics";
echo $sql."=sql<br>";

$result = mysql_query($sql) or die(mysql_error());
echo $result."=result<br>";

while($row=mysql_fetch_array($result))
{ // NOTE this one ABOVE the echo
echo "result found!";
echo $row[0];
}
?>

View Replies !
Simple Array From DB Result
I have a simple DB query which puts a set of values into a pull-down menu as follows:-

View Replies !
Speeding Up Query/code (query Within Result Set)
I'm looking for ideas on how to speed up this script. Basically it finds all the zip codes in a zipcode table, then looks for all the records in another table with those zip codes.

Right now it finds all the zips then within that WHILE, it looks for a record in another table with that zip: PHP Code:

View Replies !
Using MYSQL Result To Send Mail
I have wrote a program to load a number of email address from the MYSQL database. And I have use
"$mail = mysql_query("select email from user;",$link_ID);

Now, I want to use mail() to send email to those e-mail account I got. What should I do for this?

View Replies !
Send Ping And Log Result To File
I want to have a php script which pings a host with ping 1.1.1.1 -t all the
time and it shoukld write these things to a logfile.

When it comes like "timout exceeded" it should write this only once to a
file. Because if timout is 2000 times I don't want to have timeout exceeded
200 times in a database.

But when ping times are coming they should be logged in a file with date and
time when the ping accured.

Is this possible? - if yes, how?

View Replies !
Use Query Result Field As Query Key For New Query..
$query  = "SELECT ProjID, UserID, ProjDesc, file, OrigProj, OrigUser, ProjDate FROM projects";
$result = mysql_query($query);

I would like to take the field 'UserID', and utilise it for a Query statement to my users table in my database, to read and fill in information to my table, which looks like this:
PHP Code:

View Replies !
Variable To Flash
Basically I want it so that a person is on a php, they click on a link (i.e. a thumbnail) and then are taken to a new page which has an swf embedded in it.

This new page should pass a variable (for instance, the thumbnail id). I tried to do this by included the php variable in the 'src' tag whre I embed the swf, as I read that Flash will automatically detect that variable if I do. Code:

View Replies !
Using Query Result To Do Another Query In Loop
I have 2 tables, one called users2 and one called books. Books has a field called UserId, which is the ID of the user that added the book to the database.

My problem, is that i need to take this ID from the book table, and use it to get some information from the user table. Here is my code to get the ID from the book table: Code:

View Replies !
Passing A Variable From PHP To Flash
How do I pass a variable from a PHP script that already contains
a Variable - to my flash movie ?

E.g.

$Access = True

Now when the Flash movie opens for the first time I want to read the content of $Access...if its true or false - to give user access to view the movie or not.

View Replies !
Can Flash Tack Over A Variable
Can Flash tack over a variable (string, array, a object, ...) from a PHP - Script? When yes, such as.

View Replies !
Variable In Flash Object
my question is about flash object code and php.

how do i embed a php varible into a flash <object> coding?

this is my varible : <{$photo.imgsrc_photo}>

this is the flash object code : <param name="FlashVars" value="id=undefinedsrc= < == http://imageURL.jpg == > width=600height=600" >

View Replies !
Simple Email Send
I've got a form which when submitted I'd like it to still do what it's doing BUT also send an email to me saying that the specific form has been submitted!?

View Replies !
Cant Send A Simple Mail From My Pc.
I cant send a simple mail from my pc. I dont know smtp server name and port of my ISP. Cant I use any other smtp server and port to send my mail. Wud u pls tell me the name as well as the port of such smtp server. Can I use yahoo's smtp server?

View Replies !
Run A Query On The Db To Count The Posts, Then Echo It In The Flash.
I'm looking to create a very small .swf which displays how many posts/topics/members there are in my forum - but Im looking for it to update in real time.  So as posts are made on the forum, if someone is viewing the homepage they see the number update 'live'

I'm wondering if anyone can tell if this is hard to do?  I'm fine with PHP and am just starting to learn flash, but so far only have done minor animation.

Would it work by embedding a PHP script in the flash to run a query on the db to count the posts, then echo it in the flash.  But how would I get it to update live?

View Replies !
Adding Flash & Javascript To A PHP Variable
I have a PHP variable named flash, and within it I have the <object> element which creates the flash output. So whenever i call the variable i get the flash. Now the problem is that I am getting the "click to activate and use this control" box which I want to get rid of. So to do this I want to add the AC_RunActiveContent.js script to this variable. Is this possible? If so how do I write the code? This is the code I have already: Code:

View Replies !
Sending Db Info To A Flash Swf Via Variable
I have a client who wants a marquee of their top news story to scroll across the top of the page. the <marquee> tag does not validate - so I thought that flash would be an easy solution.

only problem is I am retrieving my data from a db - and for some reason the loadVariables function is only printing the name of my php variable. Code:

View Replies !
Using Mail() To Send A Simple Email
I have a form page that has a subject,message, and from text box. I want to be able to send email once the submit button is clicked. my code:

View Replies !
Importing A Field From MySQL Into A Variable In Flash?
I have a query that is giving me the field that I require from my database using PHP.
What is the best way to import this variable into flash? Can I echo the number out on the page and have Flash import it that way? Could I use the Load Variable command? code:

View Replies !
Loads Variable Data From A Flash Form
I'm designing an email form processor that loads variable data from a flash form. I'm trying to clean up the php file so it's not to cluttered. I want the mail recipient to receive an visually appealing HTML message, so I've created an html file with the format. I bring this file in as an include(). I was thinking that it would be possible if I could somehow assign a variable to the included file. EG:

Include ("messageHTML.php");
$messageHMTL = include("messageHTML.php");

View Replies !
Send A Simple Email Using The Mail() Function.
I am trying to send a simple email using the mail() function.

But I get a weird error:
Error 2 ErrorMsg : mail() [function.mail]: Unable to send message to SMTP server. No recipients specified. ite. ice ready. mail not sent

my code:
mail("jrestiva@gmail.com","test subject","test message","FROM: jrestiva@bsu.edu")

I'm thinking I might have to change my php.ini file? or my server isn't set up right?

View Replies !
Image Upload - Using A Variable Passed From A Flash Page
i'd like to pass a variable using post into the following form (that is from php.net)
using a variable passed from a flash page (i'm competent in flash but a novice in php)how do integrate:

$folder = $_POST['folder']."/";

into the form so that when submit occurs the folder path is passed to upload.php :

<!-- The data encoding type, enctype, MUST be specified as below -->
<form enctype="multipart/form-data" action="upload.php" method="POST">
<!-- MAX_FILE_SIZE must precede the file input field -->
<input type="hidden" name="MAX_FILE_SIZE" value="30000" />
<!-- Name of input element determines name in $_FILES array -->
Send this file: <input name="userfile" type="file" />
<input type="submit" value="Send File" />
</form>

View Replies !
Adding Advanced Flash Code & JavaScript To A Variable
I have a PHP variable named flash, and within it I have the <object> element which creates the flash output. So whenever i call the variable i get the flash.

Now the problem is that I am getting the "click to activate and use this control" box which I want to get rid of. So to do this I want to add the AC_RunActiveContent.js script to this variable. Is this possible? If so how do I write the code? This is the code I have already: Code:

View Replies !
How To Send A Special Request With SOAP Or A Simple POST Or Else?
I need a server to send an other some information, like to create an
other database.

I would like to send something like that :
<?xml ?>
<insert table="the_table">
<row>
<row_id>4</row_id>
<name>Malkovitch</name>
</row>
<row>
<row_id>5</row_id>
<name>Smith</name>
</row>
</insert>

View Replies !
Result From A Sql Query
Is there anyway I can exclude just one result from the database based upon the value of a field, for example i want to exclude the field with an ID of 1 but get all the other fields in the database. is this possible and can anyone tell me how? PS: I had thought about doing something like

$query1 = mysql_query("SELECT * FROM table ORDER BY id ASC");

while ($row = mysql_fetch_array($query1,MYSQL_ASSOC))
{
$id = $row['id'];
if ($id == 1)
{
//DO NOT DISPLAY ITEM
}
else
{
//DISPLAY ALL OTHER ITEMS
}
}

View Replies !
Result For Query
I dont know why this query is not returning a value, when I should be getting the value of &#3915;'. PHP Code:

mysql_select_db($dbname, $conn) or die (mysql_error());
    $query = "SELECT MIN(q_id) FROM questions2 WHERE quiz_id='".$quiz_id."'";
    echo $query.'<br />'
        $result = mysql_query($query) or die(mysql_error());
            $row = mysql_fetch_array($result) or die(mysql_error());
                $first = $row['q_id'];
                echo 'first='.$first.'<br />'

View Replies !
Set Dynamic Variable Names, As These Variables Will Be Returned To My Flash Movie.
I'm currently using php to connect to a mysql server. Having done so, I was wondering if it was possible to set dynamic variable names, as these variables will be returned to my flash movie.

For example, I'd like the name point_<1,2,...,20>

So would it be possible to do

for($i = 1 ; $i <= 20 ; $i++) {
print ""point_"+$i = $row($i)";
}

View Replies !
Query Result = Resource ID #10
I have an array $countertop.... i run through each one like this.
PHP Code:

View Replies !
Query Result In A Mail!
How do I insert a query result in a mail()? PHP Code:

View Replies !
Linked Result From A Query
I'm trying to create a query that will return a linked record from a
database that will take me back to an update page with that record so I

can change things in the record.

I'm having trouble finding simple code to do this.

View Replies !
Echo A $result Of Query?
Trying to have an echo display a result from a query. Not such a hard concept. Yet I am having trouble. What good is the data without analysis. Here is what I am using to try and grab result. Have been told it looks correct, must be missing something small.
When this runs, alternate echo displays in browser. So you know: 'testdata' is the table 'score' & 'id' are columns or fields.

Almost think it is missing a table structure to display in. Looking for player name column and score column (for the sake of example). Code:

View Replies !
Paging Of Query Result
This script used to be working in splitting query result into pages. But now, PREV 1 2 3 4 NEXT links is not working anymore. Any idea how to fix this ? or what is wrong with this script ? Code:

View Replies !
How To Select One Row From Query Result
once the button is clicked to find an appointment the following query is executed: Code:

View Replies !
Populate Result Query
I query database and it produces rows of results. I want to populate it so that the first 10 rows go to the 1st page, the next 10 rows to the 2nd page and so on. The last page will be at most 10 rows and it can be less than that. How do I do it? Or do anybody know if there is any sample code that I can refer to?

View Replies !
Filtering In Query Result With WHERE
I am trying to filter out records in a query using WHERE expressions. See example below.

if ($league="All") {$leaguebool="1"} else {$leaguebool="League='$league'"};
$query = "SELECT League,HR FROM ranfranbattingsim WHERE ('$leaguebool') ORDER BY $sorder DESC LIMIT $limit";

My desire is to select all records if $league='All' and select only records where LEAGUE=$league if $league is anything other than 'All'. LEAGUE is one of the fields of the database. I hope that I explained that well enough. I am open to any solutions, and have considered that perhaps I should be using something other than the WHERE statement to filter the records.

View Replies !
One Row Result Database Query
Most of the pages I write are multi-row queries. I have about 30 pages that will only yield one row of about 15 columns. What is the best way to design this page?

Right now, I am using $row = mysql_fetch_object($results) - this is causing a minor issue with positive/negative signs with numbers.

View Replies !
Query Not Returning First Result
I have a query that is returning the correct number of rows. However, when I try to print the rows out, it will not print the first row, but all after that. I can't figure out why it isn't printing out the first row, even though the query is returning the results. Here is my code below to print the results in a table: Any suggestions?

while($row2 = mysql_fetch_array($result1))
{
$affinity_name = $row2['affinity_name'];
$affinity_detail = $row2['affinity_detail'];
$affinity_no = $row2['affinity_name'];
$track_id = $row2['id'];
get_name($affinity_name);

$affinity_details .=<<<EOD
<tr>
<td><a href="/m_t5.php?affinity_id=$affinity_no&q=$name">$name</a></td>
<td>$affinity_detail</td>
<td><a href="/delete_track.php?track_id=$track_id">Delete</a></td>
</tr>
EOD;
}

View Replies !
Not Able To Grab 1st Result Of Query
I am having an issue, when I run my query (shown below) directly in MS SQL it returns the first row (home.php / 323 hits), along with the rest. Code:

View Replies !
If Query Result Returns Nothing
i have a marquee which scrolls across news items, all this is database driven, however if no news items are returns from the query, my page errors, can someone help me write an else statement or something so that the page doesn't error. my code is below:-

<?php

require('database3.php');

if(!isset($news_item))
$news_item=''

$query = "select * from monksc.news where DATE_SUB(CURDATE(),INTERVAL 14 DAY) <= startDate order by id";

$result = mysql_query ($query) or die (mysql_error());

if (mysql_num_rows($result)>0)
..............

View Replies !
Displaying Result Of A Sum Query:
$sql = "SELECT sum(value) FROM `offers' WHERE sid='$sid'";
$result = mysql_query($sql);

As you can see, I'm trying to select a column in my database which is named "value" I want to return the sum of the records which match the current user's subscriber id ($sid) I think the query is structured correctly.

However, I'm having trouble placing the result of the query into a variable that php can echo to the page. In the database, the numbers are formatted as decimal. I just want to get the sum of the fields into a numeric php variable that I can add/subtract/divide etc and echo to the page. How do I go about doing this?

View Replies !
Mysql Query Result
I have successfully selected 4 rows using a mysql SELECT query. However, I would like to random pick a row from this result so that every page refresh will yield something different.

View Replies !
Weird Query Result
I am trying to do a simple query, but instead of a numeric value, I get "Resource id #34".

$newdodgemod1 = "select default_dodgemod from phpbb_classes where class='$newclass'";
$newdodgemod2 = $db->sql_query($newdodgemod1);

Any idea what is wrong with the code? All field exist and the variables are set correctly. I don't understand why I am getting this error.

View Replies !
Query Result To Array
i have a table with two field ID and CAPACITY. i want the ID to point to the capacity on an array

$top = "SELECT * from topics";
$db = new mysqli('localhost','root',?');
$db -> select_db('testing');

$res_top = $db->query($top);
$topics = array();
while ($row = $res_top->fetch_row())
{
$topics[$row['id']] = $row['capacity'];
}

View Replies !
Query Result Values
i have two tables a customer and package table. a customer can have many packages. how i can i set a status in the customer table to 'complete' if all the packages in the package table that relate to that customer are set to 'paid'? i can do a simple select statement but how will i know if all the status rows returned from packages are set to 'paid'.

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved