Welcome Guest, Not a member yet? Register   Sign In
  redirect not removing the pound sign part of the url
Posted by: El Forum - 08-28-2008, 02:04 AM - Replies (1)

[eluser]xwero[/eluser]
I noticed when i have a url like site.com/user/1#tab1 and i do

Code:
redirect('user')
the url becomes site.com/user#tab1.

It's a aesthetic problem for the app i'm developing but i can think of scenarios where it will be a critical problem.


  codeigniter and subdomains
Posted by: El Forum - 08-28-2008, 01:26 AM - Replies (6)

[eluser]emperius[/eluser]
I have web-site which should be spread to sub-domains

sub1.site.com
sub2.site.com

is that possible to do something like this whitout mod_rewrite in codeigniter?


  Unable to stream pdf: headers already sent
Posted by: El Forum - 08-27-2008, 11:48 PM - Replies (13)

[eluser]praveens[/eluser]
hi please help me for solving this problem, i am using dom pdf plugin for generating pdf on fly , i searched all topics but i couldn't find the solution for this error. its working nice in local system but it showing above error in my server please help me to solve this problem thanks in advance


  Sell a application built with CodeIgniter
Posted by: El Forum - 08-27-2008, 11:19 PM - Replies (2)

[eluser]Patrick Otten[/eluser]
Just a simple question here. I read the license agreement, and from what I got out of it, building an application with CodeIgniter and then selling that application would be ok as long as I include the license agreement with the end product. Is this correct or did I miss something?


  dompdf error
Posted by: El Forum - 08-27-2008, 10:51 PM - Replies (2)

[eluser]praveens[/eluser]
hi any body help me, i am facing a problem while generating pdf it showing an error like Unable to stream pdf: headers already sent in server. But its working nice in local system please help me thanks in advance


  Webservices
Posted by: El Forum - 08-27-2008, 05:56 PM - Replies (7)

[eluser]Kurtis[/eluser]
hi there,
Im having trouble consuming a webservice. has anyone have some sample code how to do a webservice with CI. I installed the nusoap library but CodeIgniter uses a segment-based approach I can't figured out how to do this.


  Active Record Help?
Posted by: El Forum - 08-27-2008, 02:08 PM - Replies (6)

[eluser]ChangedNames[/eluser]
Hi. I'm new to the MVC approach and I'm trying to get the gist of how this should be structured.

I have a podcast episode database that consists of 3 tables. One table, "episodes", has the bulk of the data. Two other tables, "author" and "site", are used relationally within "episodes". An example would be the first row of "episodes" has it's own unique ID, then unique ID of the "author" and the unique ID of the "site" (site referring to location - not website). I'm working on a back-end management side to this site and can't figure out how this should work with MVC in mind.

I have a controller, dashboard, that has a function, episode. when browsing to /dashboard/episode/1 the information from the episode with the unique ID "1" is being displayed. Currently the author ID and site ID are shown ("2", and "4" respectively). The tricky part is then communicating with table "authors" and "sites" to get the 'name' value from the corresponding rows ('name' is a column in each table respective to the data).

How do I go about retrieving this type of information from the database? I don't really need a line by line code that works - I like to figure things out for myself. Perhaps if someone could just nudge me in the right direction I'd really appreciate it.

Thanks Smile


  AutoSave function
Posted by: El Forum - 08-27-2008, 01:55 PM - Replies (6)

[eluser]jeanv[/eluser]
Hi everyone,

i would like to try to implement a autoSave function on forms in CI, i found that very useful in Wordpress, i woud like to know more or less how it works. I don't ask anybody to do it for me, i will do it, but i imagine with a little help !

Well if someone has a point of view on that please let me know !

Bye


  HELP Building Captcha Auth. into stock Validation.php
Posted by: El Forum - 08-27-2008, 01:38 PM - Replies (1)

[eluser]Unknown[/eluser]
Hello.. second post here Smile

I've successfully implemented the captcha_pi.php generator into a form on my website, but I don't understand how to set up the validation.

According to the plug-in captcha_pi.php this is the check to see if the correct characters have been entered;

Code:
// First, delete old captchas
    $expiration = time()-7200; // Two hour limit
    $this->db->query("DELETE FROM captcha WHERE captcha_time < ".$expiration);        

    // Then see if a captcha exists:
    $sql = "SELECT COUNT(*) AS count FROM captcha WHERE word = ? AND ip_address = ? AND captcha_time > ?";
    $binds = array($_POST['captcha'], $this->input->ip_address(), $expiration);
    $query = $this->db->query($sql, $binds);
    $row = $query->row();

    if ($row->count == 0)
    {
        echo "You must submit the word that appears in the image";
    }

I'd like to make this check available in Validation.php just as the 'required' or 'valid_email' functions are. My inexperience with PHP is somewhat of a limiting factor at this point - I haven't the slightest idea how to do this.

Any pointers would be greatly appreciated!


  SOLVED..Xajax not saving form data to file
Posted by: El Forum - 08-27-2008, 01:36 PM - Replies (1)

[eluser]spheroid[/eluser]
When I try to output a form's data to a file, the file saved is simply a "[" (one character). Can't figure this one out. So far I have the following:

Controller

Code:
function xajax()
{
    $this->load->library('xajax');
    $this->xajax->registerFunction(array("process_form_data", &$this, "process_form_data"));
    $this->xajax->processRequest();
    $data['xajax_js'] = $this->xajax->getJavascript(base_url());
}

function process_form_data($form_data)
{
    $objResponse = new xajaxResponse();
    $kmloutput = $form_data['kmloutput'];
    $this->_save_territory_boundaries_xml($kmloutput);
    $objResponse->assign("SomeElementId", "innerHTML", $kmloutput);
    return $objResponse;
}

function _save_territory_boundaries_xml($xmldata)
{
  $File = "/path/to/my/file/test.xml";
  $Handle = fopen($File, 'w+');
  $Data = $this->_parseToXML($xmldata);
  fwrite($Handle, $Data);
  fclose($Handle);
}
    
function _parseToXML($htmlStr)
{
    $xmlStr = str_replace('&', '&amp;', $htmlStr);
        
    return $xmlStr;
}

View

Code:
[removed]
function do_submit()
{
    if (xajax.$('kmloutput').value == '')
    {
        alert("Use the territory button to draw new territory!");
    }
    else
    {
        xajax_process_form_data(decodeURIComponent(xajax.getFormValues('form_feedback')));
        xajax.$('kmloutput').value = '';
    }
}
[removed]

&lt;form id="form_feedback" name="form_feedback"&gt;
  &lt;textarea id="kmloutput" name="kmloutput" cols="125" rows="10"&gt;&lt;/textarea><br />
  &lt;input type="button" id="btn_submit" value="Submit" onclick="do_submit()" />
&lt;/form&gt;

<div id="SomeElementId" name="SomeElementId"></div>

Note, the post is removing the start and end Javascript tags (where it says "[removed]").


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

Username
  

Password
  





Latest Threads
Codeigniter 4 Model set()...
by MZahov
1 hour ago
CI Builder Question
by InsiteFX
5 hours ago
SecurityException Status ...
by kenjis
Yesterday, 03:50 PM
E-mail and UTF-8, mb_, et...
by joho
Yesterday, 07:13 AM
Shield validation questio...
by Codinglander
Yesterday, 07:07 AM
CI4 support MariaDB?
by joho
Yesterday, 07:06 AM
Using phpCas in CI4 (Comp...
by Zeff
Yesterday, 04:55 AM
where clause with order_b...
by kenjis
Yesterday, 01:55 AM
Transient support for Set...
by kenjis
Yesterday, 01:52 AM
Sharing things between CI...
by joho
Yesterday, 01:39 AM

Forum Statistics
» Members: 82,322
» Latest member: bhavishya
» Forum threads: 77,479
» Forum posts: 375,528

Full Statistics

Search Forums

(Advanced Search)


Theme © iAndrew 2016 - Forum software by © MyBB