Welcome Guest, Not a member yet? Register   Sign In
Search Results
    Thread: can't get link to work
Post: RE: can't get link to work

Wouter60 Wrote: (03-26-2016, 08:01 AM) -- My .htaccess file looks like this: Code: -- RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . ...
47,986 Views
35 Replies
03-26-2016, 08:09 AM
richie41
    Thread: can't get link to work
Post: RE: can't get link to work

Wouter60 Wrote: (03-26-2016, 06:02 AM) -- If you have a folder named "products" in the root of your website, then url routing will fail because the folder has the same name as your Products controlle...
47,986 Views
35 Replies
03-26-2016, 06:21 AM
richie41
    Thread: can't get link to work
Post: RE: can't get link to work

Wouter60 Wrote: (03-26-2016, 04:51 AM) -- Check your config.phg file in application/config. Does it have a value for $config['index_page'] ? If you let .htaccess skip the index.php part of your URL...
47,986 Views
35 Replies
03-26-2016, 04:55 AM
richie41
    Thread: can't get link to work
Post: RE: can't get link to work

Wouter60 Wrote: (03-26-2016, 03:43 AM) -- Like I said: in the index function: PHP Code: -- public function index(){    //Get All Products    $this->load->helper('url');    $data['products'] = $...
47,986 Views
35 Replies
03-26-2016, 03:55 AM
richie41
    Thread: can't get link to work
Post: RE: can't get link to work

InsiteFX Wrote: (03-26-2016, 03:33 AM) -- Post your details view code here so we can look at it. -- PHP Code: --    
47,986 Views
35 Replies
03-26-2016, 03:37 AM
richie41
    Thread: can't get link to work
Post: RE: can't get link to work

Wouter60 Wrote: (03-26-2016, 01:20 AM) -- Have you tried loading the url helper in your controller (before it loads the view from you index function)? Then, in the view, put the following code: PH...
47,986 Views
35 Replies
03-26-2016, 03:17 AM
richie41
    Thread: can't get link to work
Post: RE: can't get link to work

InsiteFX Wrote: (03-25-2016, 12:59 PM) -- Your product id needs to be passed to the controller from the view link. It sounds like you are not passing the id to the controller, you can check the in t...
47,986 Views
35 Replies
03-25-2016, 01:41 PM
richie41
    Thread: can't get link to work
Post: RE: can't get link to work

pdthinh Wrote: (03-25-2016, 05:46 AM) -- Wouter60 Wrote: (03-25-2016, 03:23 AM) -- Please try this: PHP Code: -- public function details($id) {   //Get Product Details   $data['product'] ...
47,986 Views
35 Replies
03-25-2016, 11:24 AM
richie41
    Thread: can't get link to work
Post: RE: can't get link to work

InsiteFX Wrote: (03-25-2016, 03:54 AM) -- Try this and see if it works, if not you have other problems in your code. This is just a test link to see if it works: PHP Code: -- -- -- Tried th...
47,986 Views
35 Replies
03-25-2016, 04:03 AM
richie41
    Thread: can't get link to work
Post: RE: can't get link to work

Wouter60 Wrote: (03-25-2016, 03:23 AM) -- It may be confusing, but don't use capital letters in your hyperlinks or controller/function calls. Although the file names must be first-caps, CI will recog...
47,986 Views
35 Replies
03-25-2016, 03:41 AM
richie41
    Thread: can't get link to work
Post: RE: can't get link to work

Avenirer Wrote: (03-25-2016, 03:21 AM) -- richie41 Wrote: (03-25-2016, 03:05 AM) -- Wouter60 Wrote: (03-25-2016, 02:54 AM) -- Be sure to name all controllers, libraries and models with a first capi...
47,986 Views
35 Replies
03-25-2016, 03:22 AM
richie41
    Thread: can't get link to work
Post: RE: can't get link to work

Wouter60 Wrote: (03-25-2016, 02:54 AM) -- Be sure to name all controllers, libraries and models with a first capital letter. So your Products controller must be named "Products.php", not "products.p...
47,986 Views
35 Replies
03-25-2016, 03:05 AM
richie41
    Thread: can't get link to work
Post: RE: can't get link to work

pdthinh Wrote: (03-24-2016, 07:01 PM) -- Normally you access loaded models with lower-case name. Let's give it a try. PHP Code: -- //Get All Products  $data['products'] = $this->product_model-...
47,986 Views
35 Replies
03-25-2016, 02:43 AM
richie41
    Thread: can't get link to work
Post: RE: can't get link to work

Paradinight Wrote: (03-24-2016, 12:26 PM) -- PHP Code: -- -- http://www.codeigniter.com/user_guide/helpers/url_helper.html?highlight=site_url#site_url pls use [php] tags in the board. H...
47,986 Views
35 Replies
03-24-2016, 02:59 PM
richie41
    Thread: can't get link to work
Post: RE: can't get link to work

no I didn't use capitalized filename for the controller
47,986 Views
35 Replies
03-24-2016, 02:51 PM
richie41
    Thread: can't get link to work
Post: RE: can't get link to work

twpmarketing Wrote: (03-24-2016, 02:30 PM) -- Did you use a capitalized filename for the controller?  Products.php -- no
47,986 Views
35 Replies
03-24-2016, 02:48 PM
richie41
    Thread: can't get link to work
Post: can't get link to work

Hi, I've been following a youtube video on creating a website with the use of codeigniter. The video is PHP and MySQL Get and Display Products - 6 -41. I've followed the video so far but have go...
47,986 Views
35 Replies
03-24-2016, 08:54 AM
richie41

Theme © iAndrew 2016 - Forum software by © MyBB