Contents

 
Home
PHPRunner 6.1 manual
Prev Page Next Page
 
 

Adding PHP code snippet

 

Adding PHP code snippets you can modify the appearance and functionality of the prebuilt web pages. For example, you can add additional control elements to a web page or display some information.

To add a PHP code snippet, follow the instructions below.

1. Proceed to the Visual Editor and select a page you wish to modify.
2. Click toolbar_snippet (Insert PHP code snippet) button on the Main toolbar.

visual_editor_snippet

3. Add you PHP code and click OK.
4. New page element labeled <Table name>_Snippet will appear on the page. If your code snippet displays some data on a web page, move the "snippet" element to where you wish to see that data.

visual_editor_snippet_element

To edit a code snippet, double-click on the "snippet" element or select Edit code with right-mouse button. Also you can edit a code snippet on the Events page.

To delete a code snippet, select Delete event with right-mouse button.

Examples

1. Display current time.

PHP code:

echo now();

2. Add dropdown list box with values for search.

3. Show customer orders.

4. Show data from master table on detail view/edit/add page.

Converted from CHM to HTML with chm2web Standard 2.85 (unicode)