Hey thanks! I will give this a try too. Scott pointed me to a great example he made and it solved the problem!

/Benjamin

Josh Mellicker wrote:
Wow! One I might be able to help on.

___________________________________________

In Revolution, put this script into your option menu:


ON menupick pChoice

        put pChoice into queryValue
        put  pChoice & " chosen" into field "status"

        get libUrlFormData("queryvalue", queryValue)
post it to url "http://www.yourweburl.com/thepathtoyour/phpscript.php";

        IF the result is empty THEN -- executed OK
            put it into fld "listOfFiles"
        ELSE
put the result into field "task_desc" -- there was some error in executing the PHP script
        END IF


END menupick

___________________________________________

Now, make a text file on your server (called "phpscript.php" or "whatever.php"):


<?php
require_once('dbinfo.inc');   //this is the file with your connect info


$sql = "
SELECT
    myFileName

FROM
    fileNameTable
";

$result = mysql_query($sql) or die("Error #" . mysql_errno() . ":" . mysql_error() );


if (mysql_num_rows($result)) {

    //found at least one

    while ($row=mysql_fetch_array($result)) {
    echo $row['myFileName']."\n";
    }


} else {

//didn't find any

    echo "I did not find any records.";


}


?>




On Feb 16, 2006, at 9:59 PM, Benjamin Bacon wrote:

Hi everyone,

I am trying to create two pull down menu's that are based on MySQL query's. Then based on what the user choses from the pull down menu's they can get a listing of available files based on what is already in the database. Can anyone help me on this one. I greatly appreciate the help. I am quite fresh with Revolution development and I have look in the manual and searched the web/documentation.

Thanks!
Benjamin
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution




_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to