close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Include function with recordsets variable

Thread began 11/20/2009 2:17 am by austin_kyo371741 | Last modified 1/11/2010 1:53 pm by Jason Byrnes | 2919 views | 11 replies |

austin_kyo371741

Include function with recordsets variable

Hi,

I am trying to add include function with recordsets variable on page, this is the example of the script :

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

Where $row_RS['NO'] is Recordsets variable,

I got error with this script... can some one fix this?

Thanks

Sign in to reply to this post

Dave BuchholzBeta Tester

What error message are you getting ?

Add this code to the top of the page to show error messages if you do not already have that set:

<?php
error_reporting(E_ALL);
ini_set('display_errors', '1');
?>
Sign in to reply to this post

austin_kyo371741

Originally Said By: Dave Buchholz
  What error message are you getting ?

Add this code to the top of the page to show error messages if you do not already have that set:

<?php
error_reporting(E_ALL);
ini_set('display_errors', '1');
?>
  



Hi Dave,

here is the error messages:


Parse error: parse error, unexpected T_STRING in c:\wamp\www\Page\pageinfo5.php on line 1082

This is the script on line 1082:

<td><?php include_once('sid=$row_RS['NO']_page.html);?></td>

Thanks

Sign in to reply to this post

Dave BuchholzBeta Tester

How are you defining sid ?

Sign in to reply to this post

austin_kyo371741

Originally Said By: Dave Buchholz
  How are you defining sid ?  



Actually sid is just part of the files name,i can also change it to <?php include_once('$row_RS['NO']_page.html);?> $row_RS['NO'] is the number which has been store into database table. for example if $row_RS['NO'] is 5, then it will include 5_page.html files

Sign in to reply to this post

Jason ByrnesWebAssist

your syntax should be:

php:
<?php include_once('sid='.$row_RS['NO'].'_page.html');?>
Sign in to reply to this post

austin_kyo371741

Originally Said By: Jason Byrnes
  your syntax should be:
php:
<?php include_once('sid='.$row_RS['NO'].'_page.html');?>
  



Hi Jason,

Thanks alots, it works!!!

Sign in to reply to this post

Zulian

Can you show me an example of this?

Hello Jason Byrnes & austin_kyo371741,

This is interesting, can anyone show me a real example of this. I also need my recordset details to have a friendly URL like below;

As you are using <?php include_once('sid='.$row_RS['NO'].'_page.html');?> , can I print my recordset detail as .html exention.

for eaxample, ?apple=apple to apple.html

Regards

Sign in to reply to this post

Jason ByrnesWebAssist

sure, you can include an html page in your page page using the include once, if the value of $row_RS['NO'] is "apple", then the following code:

php:
<?php include_once($row_RS['NO'].'.html');?>



will include the file:
"apple.html"

Sign in to reply to this post

Zulian

How to get recordset name as page with .html extension

Dear Jason,
This is my php code where I wanted to make pagename with .html extension.

<a href="pages.php?page=<?php echo urlencode($row_rsGlobal['name']); ?>"><?php echo $row_rsGlobal['name']; ?></a>

I wanted <?php echo urlencode($row_rsGlobal['name']); ?>.html to be the name of the page.

so if $row_rsGlobal['name'] is webassist, my page should be webassist.html

How can I do this?

Thank you

Zulian

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...