Hi Andrew, et al… Still no luck. I've included the complete php script below:
<?php require_once('config.php'); $link = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD); if(!$link) { die('Failed to connect to server: ' . mysql_error()); } $db = mysql_select_db(DB_DATABASE); if(!$db) { die("Unable to select database"); } function clean($str) { $str = @trim($str); if(get_magic_quotes_gpc()) { $str = stripslashes($str); } { return mysql_real_escape_string($str); } } $doccode = clean($_POST['doccode']); $result = mysql_query("SELECT urladdress, urltitle FROM urllist WHERE docid = $doccode"); if($result === FALSE) { die(mysql_error()); } while($row = mysql_fetch_array($result)) { echo "<br><a href=\"http://www.youtube.com/embed/" .$row['urladdress']. "\">". $row['urltitle'] . "</a>"; } ?> This works fine here: jpatten.on-rev.com/safetube_student/home.php (type a 19 into the field) But in a lc code stack with a button and two flds I get: "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1" Button's script: on mouseUp post cd fld 1 to URL "http://jpatten.on-rev.com/safetube_student/lc_lookup_list_exec_nc.php" put it into cd fld 2 answer the result end mouseUp Thanks in advance for any help! John Patten SUSD _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode