Jump to content

Recommended Posts

Im trying to run this

and this is the error im getting

Fatal error: Cannot break/continue 1 level in /mnt/target02/348149/domainname.net/web/content/MaillistV2/controller/controller.php on line 12

here is the code below

$content = $run_include->process_includes('views','login.php');

into this

$run_include->start_skin('skin.php',$title,$content);

Here is the complete code

<?php
/**
* Include all Files Required
*/
require_once('controller/controller.php');
/**
* Register Classes
*/
$run_include = new run_include;
/**
* Call Pages
*/
$pageref = $_GET['pageref'];
switch ($pageref) {
	case 'login':
		$title = 'Login Page';
		$content = $run_include->process_includes('views','login.php');
		break;
}
/**
* Call Skin
*/
$run_include->start_skin('skin.php',$title,$content);
?>

Ok this is what i have, It is printing the actual login page but it is printing it above my design.

Im trying to include it in the variable called $content

How do i do that,

currently all it does is print the form above everything.

<?php
/**
* Include all Files Required
*/
require_once('controller/controller.php');
/**
* Register Classes
*/
$run_include = new run_include;
/**
* Call Pages
*/
$pageref = $_GET['pageref'];
switch ($pageref) {
	case 'login':
		$title = 'Login Page';
		$content = $run_include->process_includes('views','login.php');
		break;
}
/**
* Call Skin
*/
$run_include->start_skin('skin.php',$title,$content);
?>

 

function process_includes

should return $filestuff, otherwise its pointless..

 

your need to look at the start_skin and change the echo/prints to sets

ie

echo "<title>test</title>";

to

$contents = "<title>test</title>";

 

then return echo $contents;

 

or use ob_start to capture the output

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.