Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7805269
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T02:10:18+00:00 2026-06-02T02:10:18+00:00

I am using this in my viewregistration.php file <html> <head> <link rel=stylesheet type=text/css href=<?php

  • 0

I am using this in my viewregistration.php file

<html>
<head>
<link rel="stylesheet" type="text/css" href="<?php echo $base_url; ?><?php echo $css; ?>reg_style.css" />
<link rel="stylesheet" type="text/css" href="<?php echo $base_url; ?><?php echo $css; ?>style.css" />
</head>
<body>
    <?php $this->load->view('include/header');?>
    <?php $this->load->view('registration_view.php');?>
    <?php $this->load->view('include/footer');?>
</body>
</html>

And I am calling it in my conltroller as

$data['title']= 'Registration';
$this->load->view("viewregistration.php", $data);

And in my controller I am using

parent::__construct();

        $this->load->helper('url');
        $this->load->helper('form');

        $this->load->database();
        $this->load->model('user_model');
        $this->load->model('systemdata');

        $this->data['css'] = $this->systemdata->get_css_filespec();
        $this->data['scripts'] = $this->systemdata->get_scripts_filespec();
        $this->data['base_url'] = $this->systemdata->get_base_url();

But the css file is not loading. It show some error like

A PHP Error was encountered

Severity: Notice

Message: Undefined variable: base_url

and

A PHP Error was encountered

Severity: Notice

Message: Undefined variable: css

What I am doing wrong?
I have used autoload url helper. But the result remains same.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T02:10:20+00:00Added an answer on June 2, 2026 at 2:10 am

    Your variables aren’t defined because you’re not actually passing them to your view. $data and $this->data are not the same thing.

    Here, you are correctly passing the $data array to your view:

    $data['title']= 'Registration';
    $this->load->view("viewregistration.php", $data);
    

    But notice here how you’re assigning your variables to $this->data, which never gets passed to the view:

    $this->data['css'] = $this->systemdata->get_css_filespec();
    $this->data['scripts'] = $this->systemdata->get_scripts_filespec();
    $this->data['base_url'] = $this->systemdata->get_base_url();
    

    You either need to assign your variables to $data or pass $this->data to your view.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using this call <a href=deleteDialog.html data-rel=dialog data-transition=pop data-role=button id='deleteDialog'>Delete</a> to get the following dialog
using this code: <script src=<?php bloginfo('template_url'); ?>/scripts/hovermenus.js type=text/javascript></script> to load this script firebug is
Using this really simple html / css ( http://jsfiddle.net/XXzTj/ ) <div style=background-color:red;> <div style=margin:12px;
Using this script to send id to file.php which queries database and returns output
Using this php script, I can call a webservice. The file names will be
Using this file as source, I have a situation where I need to retrieve
Using this xslt file found on this blog to pretty print xml using Nokogiri,
Using this jquery code: <a href=javascript:void(0) id=m1>Get Selected id's</a> jQuery(#m1).click( function() { var s;
Using this code var html='<div class=somediv></div>'; var target=document.getElementById('contentArea'); target.appendChild(html); I'm getting Uncaught Error: NOT_FOUND_ERR:
Using this batch file I want zip some *.txt files. Each *.txt file in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.