Well, your code goes after the section where it says START MAIN SCRIPT. Save the results of your code into variables, register them, and call them in the template.
|
Thnx a lot, Now i got some idea.
--------------- Added [DATE]1274196333[/DATE] at [TIME]1274196333[/TIME] --------------- can you please tell me how to dislpay registered variables in php??? what is proper code??? i am using VB4 --------------- Added [DATE]1274196683[/DATE] at [TIME]1274196683[/TIME] --------------- This Is My Code include "connect.php"; $query = "select * from plants"; $result = mysql_query($query); $row = mysql_fetch_array($result); $templater->register('query', $query); $templater->register('result', $result); $templater->register('row', $row); if(mysql_num_rows($result) > 0) { while($row = mysql_fetch_array($result)) { echo "data found"; } } else { echo "No Record With These Parameters"; } |
You're in the wrong thread completely. This is for vB3, but you are using vB4 and thus followed a completely different tutorial. You really need to do some reading on how to register variables for vB4 (there's a tutorial for that, too), and then ask in your own thread. This is totally off topic here, and I won't continue answering in this thread. Before doing so: Please use code or php tags if posting code, and please read the article I linked you to regarding the vB database classes. If doing database operations insinde vB, you really should use them.
|
|
hello my test.php is like this and gives some errors any help pls?
http://izmir.tr.kg/test.php ? any help? thank you... |
Does this work in VB4?
|
Quote:
|
Quote:
Thank you! |
Quote:
|
I'm having trouble getting this working.
Am getting the following errors (below). ======= Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: navbar in [path]/includes/functions.php on line 3957 Parse error: syntax error, unexpected T_STRING in /home/bostonwh/public_html/adhub1.php(42) : eval()'d code on line 1 Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: adhub1 in [path]/includes/functions.php on line 3957 ======= The last part of my custom php file (named adhub1.php) is as follows (see just below): (and I do have a template named 'adhub1'.) Line 42 - which is where the error msg points to - is the line there that contains '... fetch_template('navbar' ...' Any ideas ? I must be missing something simple. Thanks. // ############ START MAIN SCRIPT ################ $navbits = array(); $navbits[$parent] = 'adhub1'; $navbits = construct_navbits($navbits); eval('$navbar = "' . fetch_template('navbar') . '";'); eval('print_output("' . fetch_template('adhub1') . '");'); ?> |
All times are GMT. The time now is 02:14 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|