Welcome Guest, Not a member yet? Register   Sign In
  Javacript and CI form arrays
Posted by: El Forum - 10-11-2007, 04:27 AM - No Replies

[eluser]PaddyX[/eluser]
Hi,

This is probably a very simple question. Using the form helper I am passing an associative array containing the data I want the form to contain:

$data = array('name' => 'username', 'id' => 'username');

I also want to associate a JavaScript script with each form element. I can do this by:

$explain = 'onmouseover="explain(\'sidebar\', \'<p>Why do we need ..?</p>\')"

then

form_input($data, $explain)

Which is great. But I would like the JavaScript to have different variables passed to it depending on the element in question. Is it possible to do this by for example defining the JavaScript to be passed in the $data array rather than when the form is being written?

I hope that this makes sense.

Thanks

Paddy


  how to get data from html page and insert into database?
Posted by: El Forum - 10-11-2007, 04:17 AM - No Replies

[eluser]Unknown[/eluser]
I am fresh for php. would you please tell me how to get data from html page and insert into database. i found the CI user guide tell us how to render data, however, it does not tell us how to get data. please refer the following example:


&lt;input id="username" name="username" type="text" /&gt;
&lt;input id="pwd" name="pwd" type="text" /&gt;
&lt;input id="Submit1" name="submit1" type="submit" value="submit" /&gt;


there are 3 input fields in the page. how i can get the data from "username" and "pwd" textbox in the controller when visitor clicks on "submit"? and how to insert them into database?
thanks in advance.


  [validation] problem with validation library and htmlentites (strange conversion)
Posted by: El Forum - 10-11-2007, 03:10 AM - No Replies

[eluser]ariok[/eluser]
Hi !
I have a problem with this code

Code:
$arr_data = array (
   "first"=>htmlentities ($this->validation->first),
   "last"=>$this->validation->last,
   "email"=>$this->validation->email,
   "username"=>$this->validation->username,
   "password"=>$this->validation->password,
   "sede"=>$this->validation->sede
);

$this->db->insert("pnl_users",$arr_data);

In "first" field i try to use an htmlentites conversion, but when i insert the char 'à'
i obtain this conversion "Atilde sup2"(&Atilde;&sup2Wink instead of "agrave"(&agraveWink

Could you help me??

(i also tried to apply html entities directly in rules with $rules["first"]="htmlentities" but nothing changes)


  New UI Library in development
Posted by: El Forum - 10-11-2007, 02:20 AM - No Replies

[eluser]Unknown[/eluser]
Hello, starting today I made public a small proof of concept on building interfaces in php directly with the help of jQuery UI components.

Details are Here in the wiki.

Simple usage as:

Code:
$this->load->library("UI");
$this->setTheme("flora");

$this->ui->open("tabs");
$this->ui->addTab("Some Tab", "<h1>Yay</h1>");
$this->ui->addTab("Some Other Tab", "<h1>Hooray</h1>");
$this->ui->close("tabs");

$this->load->view("someView", array("tabs" => $this->ui->tabs()));

produces quality tabs in any layout.

This library uses an extended CI Loader class that will be discussed soon.

For details and download go here


  Blank page weirdness.
Posted by: El Forum - 10-11-2007, 12:19 AM - No Replies

[eluser]Unknown[/eluser]
Hi,

I have a problem where a blank page is returned after I make a call to a search class I have but if I go to the controller and put in a simple echo statement it all works -- here's the weirdness -- if I then take the echo statement out of the controller (i.e. put the controller back to the way it was) it STILL works.

It carries on working for me for as long as I'm on the site but if I try the next day it's back to not working. The situation occurs in both IE and Firefox.

Of course I'd be grateful if anybody could shed some light?


  dynamic functions
Posted by: El Forum - 10-10-2007, 10:22 PM - No Replies

[eluser]Unknown[/eluser]
Hi there.. im new to code igniter.. started it about 3hours ago. and im in the middle of transforming my site to use CI framework. and im wondering how to go about this.

I have several users who are members of my site and part of the development team.
if you go to
about.php?u= {their username} it brings up a little bio
so how would i make it so that if they go to
about/{username}

i know i can go to about.php and make a function for each of their usernames and that will work, but i was hoping that there is another way to do it.

im sure this has been addressed before and its probably somewhere on the wiki or the forum but couldnt find it. Any help is greatly appreciated.


  Tutorial 2 mssql connection issues
Posted by: El Forum - 10-10-2007, 08:34 PM - No Replies

[eluser]Unknown[/eluser]
I am really new at PHP and Codeigniter and folloing tutorial 1 really interested me in this framework.
However we use MS SQL server and the tutorial 2 eample just produced a empty page on the first connection test.
I realise that the autoload instructions in the movie have been superseeded:
$autoload['libraries'] = array('aatabase'); rather than
$autoload['core'] = array("database); //

Does it matter that in my system there is no "database" in the libraries folder but rather an entire directory at the library folder level?

Is there an issue in using an IP address for the connection?

Noob question: Is there a way to get more information on what is happening rather than just a blank screen?

I really want this to work.

thanks

tladb


  Form Methods
Posted by: El Forum - 10-10-2007, 08:14 PM - No Replies

[eluser]schnoodles[/eluser]
As i start to use forms more and more i see that there are some methods ive never used, aswell as that i dont even know what they do.

Just pasting it here to get abit more of a rundown on how and where i should use these methods.

- prep_for_form
- encode_php_tags


  CSS and Images with CodeIgniter
Posted by: El Forum - 10-10-2007, 07:36 PM - No Replies

[eluser]AdobeDelight[/eluser]
On my controller home.php, i have this simple line:

Code:
&lt;?php
class Home extends Controller {

    function Home()
    {
        parent::Controller();    
    }
    
    function index()
    {
        $data['message'] = 'Hello World';
        $this->load->view('home_view', $data);
    }
}
?&gt;

On my view file home_view.php, i have this:

Code:
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;myApp&lt;/title&gt;
&lt;link rel="stylesheet" type="text/css" href="styles.css" media="screen" /&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;?=$message?&gt;
&lt;/body&gt;
&lt;/html&gt;

When i loaded the page, i noticed that the style.css was not getting loaded properly, then i changed the stylesheet href to :

&lt;link rel="stylesheet" type="text/css" href="system/application/views/styles.css" media="screen" /&gt;

and this worked. Does this means, from now on, i have keep entering "system/application/views/" front of all my css and images? Is there not a easier way of doing this?


  New to CodeIgniter... got a simple question
Posted by: El Forum - 10-10-2007, 05:38 PM - No Replies

[eluser]AdobeDelight[/eluser]
Hello,

I saw the video tutorial about how to use this PHP Framework and I instantly fell in love with this script. I wanted to start using it straight away, so i downloaded it and placed it in my web server on Windows OS, running XAMPP Suite.

When i entered this in my browser:

http://localhost/myApp

I saw the welcome message. According to the tutorial, If i typed this into the browser:

http://localhost/myApp/welcome

I should see the same welcome page right? Well, on my web server, it is giving me 404 file/folder not found error.

Why isn't it working? Im new to CI, so i would much appreciate it if someone would help me get this working. Thanks.


Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Latest Threads
hot-reload side effects s...
by PaulC
11 hours ago
CodeIgniter.com - Report ...
by Harry Lyre
11 hours ago
Setting baseURL in Regist...
by michalsn
Today, 12:09 AM
Update from 4.6.0 to 4.6....
by FlavioSuar
Yesterday, 04:17 AM
Sessions old files are de...
by InsiteFX
05-12-2025, 10:30 PM
Ajax post failing with Ty...
by PaulC
05-12-2025, 12:23 AM
intermittent smtp failure...
by InsiteFX
05-11-2025, 11:30 PM
MVC vs MVCS vs CodeIgnite...
by FlavioSuar
05-10-2025, 10:33 AM
CodeIgniter Shield 1.0.0 ...
by timesprayer
05-10-2025, 05:22 AM
Website Traffic Drop Afte...
by InsiteFX
05-10-2025, 04:23 AM

Forum Statistics
» Members: 145,992
» Latest member: vlxx88vip
» Forum threads: 78,389
» Forum posts: 379,450

Full Statistics

Search Forums

(Advanced Search)


Theme © iAndrew 2016 - Forum software by © MyBB