• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need help related to my codeigniter wallpaper script

#21
@jreklund, again thank you!

You gave me the hint.

This works.

PHP Code:
$haystack = array('1','2','3','4','5','6'); 



Regards,
Reply

#22
Hello!

A new unknown for me. Undecided

When I try to add a wallpaper to favorites, returns me this error: "Wallpaper hash doesn't exists."

I think I managed to find where's the problem, but I don't know how to solve it.

There are 2 php files that are involved here:

1st is named wall_model.php

PHP Code:
class Wall_model extends WS_model
{
 
   public function getWallpaperByHASH($hash)
 
   {
 
       $this->wallpaperTemplate();
 
       $this->db->where('w.wallpaper_hash'$hash);
 
       return $this->row();
 
   }


2nd


PHP Code:
  $hash $this->input->post('hash');
 
       $this->load->model('wall_model');
 
       $wallpaper $this->wall_model->getWallpaperByHASH($hash); // if i replace here "$hash" with the number of the hash wallpaper the favorite was successful registered.
//i think the hash is not loaded, that is why the error message. Can someone tell me if the code from "wall_model.php" is right? 

Thank you!
Reply

#23
(Yesterday, 05:14 AM)stand Wrote: Hello!

A new unknown for me. Undecided

When I try to add a wallpaper to favorites, returns me this error: "Wallpaper hash doesn't exists."

I think I managed to find where's the problem, but I don't know how to solve it.

There are 2 php files that are involved here:

1st is named wall_model.php

PHP Code:
class Wall_model extends WS_model
{
 
   public function getWallpaperByHASH($hash)
 
   {
 
       $this->wallpaperTemplate();
 
       $this->db->where('w.wallpaper_hash'$hash);
 
       return $this->row();
 
   }


2nd


PHP Code:
  $hash $this->input->post('hash');
 
       $this->load->model('wall_model');
 
       $wallpaper $this->wall_model->getWallpaperByHASH($hash); // if i replace here "$hash" with the number of the hash wallpaper the favorite was successful registered.
//i think the hash is not loaded, that is why the error message. Can someone tell me if the code from "wall_model.php" is right? 

Thank you!

Check the $this->input->post('hash'); value
Reply

#24
(Yesterday, 05:51 AM)Paradinight Wrote: Check the $this->input->post('hash'); value

I'm not sure what to check at this value. Huh

To replace with something?

To delete it?
Reply

#25
In the form where you "add favorites", somehow 'hash' aren't populated or incorrect value.
You need to find the file that adds 'hash' value to that page.
Reply

#26
(Yesterday, 07:26 AM)jreklund Wrote: In the form where you "add favorites", somehow 'hash' aren't populated or incorrect value.
You need to find the file that adds 'hash' value to that page.

Yes, just a trailing slash "/" was missing in file where send the post. (I made all URLs to be 301 redirected with an end trailing slash "/" and this one from file, don't had a "/" and every time when was called it redirects to the version with the "/" and the hash wasn't sent. I hope you understand what i meant to say Smile .

Now, once i added "/" in this file where the ajax call is made, no redirect and works.

Again, @jreklund thank you for your explanation.
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2018 MyBB Group.