Skip to main content
Participant
November 19, 2009
Question

Include function with recordset variable

  • November 19, 2009
  • 1 reply
  • 270 views

Hi,
i am trying to include a content from another files with a recordset variable,but it doesn't work...

here is the script

<?php
include_once('proid=$row_RS['No']_page.html');?>

can i know how to fix this?


Thanks

This topic is closed to new replies. Start a new post to keep the conversation going.

1 reply

David_Powers
Inspiring
November 20, 2009

kyo8888888888 wrote:

<?php
include_once('proid=$row_RS['No']_page.html');?>

If you are including a file, the value should be a filename or path. Beginning with "proid=" makes no sense.

Even if it did, your PHP syntax is completely wrong. Assuming $row_RW['No'] contains an expression to which you want to add _page.html, it should be this:

<?php

include_once($row_RS['No'] . '_page.html');

?>

However, an include file should not be a full HTML page. It should contain only the code or HTML that you want to include at that point.