Welcome Guest, Not a member yet? Register   Sign In
  Can't POST
Posted by: El Forum - 09-12-2007, 04:14 AM - No Replies

[eluser]ouzodestructo[/eluser]
I have developed a site and have put it on my web server but my forms don't post any data.
Have a look at http://www.geneethics.org/contact.

I have put in a print_r($_POST) in my controller to show whats passing (nothing!)

It works on my dev box, so why not here? I have brought it up with my web hosts but they say its not them.

Any ideas whats going on here?


  url and config
Posted by: El Forum - 09-12-2007, 03:12 AM - No Replies

[eluser]wojtekk[/eluser]
i made in config dir web.php

Code:
<?php  if (!defined('BASEPATH')) exit('No direct script access allowed');
    $CI =& get_instance();
    $CI->load->helper('url');
    
    $config['dir_images'] = base_url().'images/';
?>

and in autoload.php
Code:
$autoload['config'] = array('web');

i did it like that because i dont think u should put anything more to config.php
i just want in one place directory (so icould change it easily) and just call
Code:
$this->config->item('dir_images')

I saw Assets Helper
but
structure of dirs on all pages not always the same
so
Code:
$config['dir_images'] = 'images/';
or
Code:
$config['dir_images'] = '/images/';
is correct

so add base_url() to link is the best solution
Correct me if im wrong and maybe there is other better solution


  Rewrite on name
Posted by: El Forum - 09-12-2007, 12:52 AM - No Replies

[eluser]iniweb[/eluser]
I'am very interesting how work controller on: http://codeigniter.com/news/ and this rewrite: http://codeigniter.com/news/codeigniter_154_released/

Please show me controller ):


  combining 2 different application
Posted by: El Forum - 09-11-2007, 11:01 PM - No Replies

[eluser]dedenf[/eluser]
Hi,

i'm trying to combine 2 different application in one url, i have 1 apps that displaying and manage the newsite its powered by codeigniter, and the other apps is the file sharing application. i try to combine that 2 application but i got stuck in the uri path.
http://example.com/ << news site
http://example.com/appshare/ << file sharing application

appshare is meant to be a subdirectory url path from the "DocumentRoot" of the example.com not as the controller (appshare controller), how do i combine it without calling appshare as the controller? this is like escaping the appshare directory from the CI frameworks.
i've been looking around but have not found the answer yet.

thanks a lot


  Where Clause does not limit result set
Posted by: El Forum - 09-11-2007, 04:04 PM - No Replies

[eluser]Henry Weismann[/eluser]
I need a model to grab results based on a where clause but when the variable (customer_id) of the where clause is not given I want it to give an empty result set.

Should I be checking whether customer_id is empty before running the model function and if it is set $data to an empty quote or can I have the model take the empty variable and return an empty set.

The problem is if customer_id is empty when it is sent to the model function the whole table is returned as a result.

Model:

Code:
function get_stores($customer_id, $limit,$offset)
    {
    
        $this->db->where('customerName', $customer_id);
        $this->db->limit($limit,$offset);
        $query = $this->db->get('storeinfo');
        return $query->result();
    }

Controller
Code:
function moviesSold($invoice_id, $limit = 20, $offset = 0)
        {
        
        $customer_id = $this->customer_id ? $this->customer_id : $this->uri->segment(4);
        
        
        $data['store'] = $this->Customer_model->get_stores($customer_id,75,0);
.................................
................
..........
.....
..
.

How should I do this.


  Using a form + uri segments?
Posted by: El Forum - 09-11-2007, 03:30 PM - No Replies

[eluser]Dauntless[/eluser]
Hi,

I have a list of products (=catalog) where you can order the products by entering the amount and pressing 'order'. Now, you click the 'order' button directly from the product list (and not from a separate product-page). I have a controller function 'addToCart' that accepts 2 arguments: productID & amount. How can I put these things to getter? The user has to fill in a number (the amount), press 'order' and it should go to 'addToCart/productID/amount' .

Can this be done? Or do I have to rewrite the 'addToCart' function so that it processes $_POST ?

Greets,
Dauntless


  Javascript-Only Sites?
Posted by: El Forum - 09-11-2007, 11:17 AM - No Replies

[eluser]Vik[/eluser]
It seems like the site I'm developing would be much easier to use if I could do a user interface that requires the visitor to have Javascript. Here's why:

One of my pages will have about 20 popup menus on it. Depending on what the user selects in each one, a new, additional popup menu will appear, with its contents determined by what the user selected in the previous one.

With Javascript, I can (theoretically at least - I'm still working on the code) make this happen.

Without it, I'll have to have a different user interface - one that is more cumbersome for the user.

I looked up how many browsers have Javascript enabled (http://www.upsdell.com/BrowserNews/stat_trends.htm). It seems to be 95%:

Quote:Java and JavaScript Trends

This discusses trends in Java and JavaScript usage.
Summary

A significant number of users have browsers in which Java or JavaScript are not enabled. The percentage has decreased somewhat over the years, but it will likely remain significant for years to come.
Recommendation

Java and JavaScript should generally not be used for things which affect a site’s functionality. They are best used to make a site look more attractive.
Details

You can find information about JavaScript, including which browsers support which versions of JavaScript, in Wikipedia.

TheCounter (Jun 2007) reports these levels of support:
[.....]
Users JavaScript Support
5% none/disabled
95% enabled

Sites which need Java or JavaScript to function will deter users who have disabled them, therefore such sites will have more visitors with scripting enabled, but exact percentages likely will depend a lot on the site, and such percentages are not available.

But this quote also says, "JavaScript should generally not be used for things which affect a site’s functionality."

So the question is, with 95% of web browsers using Javascript, why is it a mistake to rely on Javascript for a site's functionality?


  No input file specified and htaccess
Posted by: El Forum - 09-11-2007, 10:59 AM - No Replies

[eluser]Lobosaurus[/eluser]
Hi,

I am getting "No input file specified" error message at my Godaddy hosting (caused by PHP as CGI).

I tried hack with

Code:
$config['index_page'] = "index.php?";
and url´s like /index.php?welcome are now OK. Unfortunately I am not able to use it with friendly url´s in .htaccess file. I tried about ten variations and nothing was working. My current .htaccess file looks like:
Code:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?$1 [L]

Has anybody working htaccess file at godaddy?


  Dropdown from DB Alphabetized
Posted by: El Forum - 09-11-2007, 10:46 AM - No Replies

[eluser]I666I[/eluser]
Hi,

I have a dropdown being populated from the db, and It's working except that I'd like the list to be alphabetized.

I tried SELECT id, last_name FROM Names ORDER BY last_name and it didn't throw an error, but it also didn't order the list.

Is there a way to get this working?

Much thanks.


  Live Tutorial Starting in 20 Minutes
Posted by: El Forum - 09-11-2007, 10:46 AM - No Replies

[eluser]Michael Wales[/eluser]
Live Tutorial: CodeIgniter Blog

At 1000 PST I will start "live-blogging" the development of a blog in CodeIgniter. Right now I am just aiming for basic functionality - user login, posting, and commenting. We may add in Categories if things go well, I don't know yet.

So, check out that post - and start refreshing around 1005 / 1010 when I get the first update out there.


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

Username
  

Password
  





Latest Threads
Ajax post failing with Ty...
by PaulC
37 minutes ago
MVC vs MVCS vs CodeIgnite...
by FlavioSuar
2 hours ago
CodeIgniter Shield 1.0.0 ...
by timesprayer
8 hours ago
Website Traffic Drop Afte...
by InsiteFX
9 hours ago
Magic login link not work...
by InsiteFX
9 hours ago
Is codeigniter 5 upco...
by InsiteFX
9 hours ago
CI4 Auto-Discovery not wo...
by InsiteFX
Yesterday, 11:04 PM
Why PHP is still worth le...
by InsiteFX
Yesterday, 10:55 PM
Any user guid or video o...
by msnisha
Yesterday, 02:30 PM
Why Every Programmer Need...
by Yetkiliteknikservis
Yesterday, 01:49 PM

Forum Statistics
» Members: 145,126
» Latest member: thabett88
» Forum threads: 78,385
» Forum posts: 379,433

Full Statistics

Search Forums

(Advanced Search)


Theme © iAndrew 2016 - Forum software by © MyBB