Total members 11894 |It is currently Mon Nov 25, 2024 7:33 am Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka





Hi,
I am creating web page with php, mysql and javascript. Menu items are printed from db
Code:
$db = new Database($config['server'], $config['user'], $config['pass'], $config['database'], $config['tablePrefix']);
$db->connect();
$sql = "SELECT lt FROM meniu";
$countRows = $db->query($sql);
while ($countRow = $db->fetch_array($countRows)) {
echo "<li class='sub'><a href='javascript:void(0)' onclick='open_url('content.php?id=','my_site_content');'>".$countRow['lt']."</a></li>";
}
$db->close();

after ?id= should be meniu item id. Could someone write which variable to write?




Author:
Newbie
User avatar Posts: 37
Have thanks: 0 time
Post new topic Reply to topic  [ 1 post ] 

  Related Posts  to : PHP variable in javascript
 different between Local variable and Global variable     -  
 Variable interpolation     -  
 transient variable     -  
 Unset variable     -  
 Passing a Reference Variable     -  
 Variable Size Arrays     -  
 how to call a global variable?     -  
 Delete session variable     -  
 Testing the Type of a Variable     -  
 static variable defined in function     -  



cron





Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com