Note that there are some explanatory texts on larger screens.

plurals
  1. PO$_GET is not null and returns undefined id
    primarykey
    data
    text
    <p>i have being tried to do solve a problem with a undefined id but i can't. It says me that i have undefined id but if i don´t use "isset" the program runs really nice but i need the file outputs the information instead of the:</p> <pre><code>Notice: Undefined index: id in C:\xampp\htdocs\treeview_v2\load_url_db.php on line 17 Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\treeview_v2\load_url_db.php on line 23 Notice: Undefined variable: url in C:\xampp\htdocs\treeview_v2\load_url_db.php on line 27. </code></pre> <p>The file to load information is this:</p> <pre><code>&lt;?php include_once 'acess_db.php'; //echo $_GET['id']; //// // //if(isset($_GET['id'])) //{ // read_url(); //} //else //{ // echo 'erro...'; //} $a = $_GET['id']; echo $a; read_url($a); function read_url($id) { $rs = mysql_query("select url from dados3 where id=$id"); while($row = mysql_fetch_array($rs)) { $url = $row["url"]; } echo "&lt;iframe src=\"{$url}\" style=\"height=\"75%\" width=\"100%\"&gt;&lt;/iframe&gt;"; } ?&gt; </code></pre> <p>And the html code is like this:</p> <pre><code>&lt;?php include_once 'load_url_db.php';?&gt; &lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt; &lt;html&gt; &lt;head&gt; &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&gt; &lt;meta name="keywords" content="jquery,ui,easy,easyui,web"&gt; &lt;meta name="description" content="easyui help you build your web page easily!"&gt; &lt;title&gt;Async Tree - jQuery EasyUI Demo&lt;/title&gt; &lt;link rel="stylesheet" type="text/css" href="http://www.jeasyui.com/easyui/themes/default/easyui.css"&gt; &lt;link rel="stylesheet" type="text/css" href="http://www.jeasyui.com/easyui/themes/icon.css"&gt; &lt;link rel="stylesheet" type="text/css" href="http://www.jeasyui.com/easyui/demo/demo.css"&gt; &lt;script type="text/javascript" src="http://code.jquery.com/jquery-1.6.1.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="http://www.jeasyui.com/easyui/jquery.easyui.min.js"&gt;&lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;div style="width: 300px; float: left;"&gt; &lt;ul id="tt" class="easyui-tree" url="get_tree_data_id.php" data-options="animate:true" &gt; &lt;/ul&gt; &lt;/div&gt; &lt;!-- A IFRAME CARREGA A SRC ATRAVES DO PHP--&gt; &lt;div&gt; &lt;iframe id="a" name="ifrm1" style="float: right; width: 80%; height: 100%; visibility: hidden;" src='load_url_db.php'&gt; &lt;/iframe&gt; &lt;button class="button" onClick="getIframeContent(a);"&gt;&lt;span class="icon"&gt;Open&lt;/span&gt;&lt;/button&gt; &lt;/div&gt; &lt;script language="Javascript" type="text/javascript"&gt; //TORNA A IFRAME VISIVEL $('#tt').tree({ onClick: function(){ console.log("Entrou na funçao.."); $("#a").css("visibility", "visible"); var node = $('#tt').tree('getSelected'); console.log("Selecionou o no.."); $("#a").attr('src', "load_url_db.php?id=" + node.id); console.log("ID do no selecionado: " + node.id); } }); &lt;/script&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>If anyone knows what is wrong and can help me i will appreciate.</p> <p>Best regards.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload