Posted by unfungames on November 9, 2012 at 5:08pm
For the website I'm working on, I have a program which is going to be generating PHP pages. I would like the visotors's drupal login to be associated with these pages.
What I mean is, I want them to be logged into their drupal account on my site regardless of the page. So when I create a php page, I need to know what I need to put in there to make sure its counting as a drupal page, too.
Comments
Why do you need custom PHP
Why do you need custom PHP pages? Why not use Drupal functionality?
Try this:<?php// Bootstrap
Try this:
<?php
// Bootstrap Drupal. (Drupal 6 syntax)
require_once 'includes/bootstrap.inc'; // Path may differ depending on where you custom.php file resides.
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
// Load the form
$form = drupal_get_form('user_login');
// Render the form
echo $form;
?>
For more detail check http://api.drupal.org/api/drupal/includes%21bootstrap.inc/function/drupa...