Click here to Skip to main content
15,881,709 members
Home / Discussions / Web Development
   

Web Development

 
AnswerRe: feeling frustrated please help me Pin
Anil Vaghasiya14-Jul-15 21:43
professionalAnil Vaghasiya14-Jul-15 21:43 
QuestionWireframe / Mockup tools Pin
C-P-User-317-Jun-15 7:10
C-P-User-317-Jun-15 7:10 
Question[CKEditor] How to search the contents in the string? Pin
Member 110547239-Jun-15 15:43
Member 110547239-Jun-15 15:43 
QuestionHTML5: Local Data Base. Pin
Member 117446415-Jun-15 4:18
Member 117446415-Jun-15 4:18 
AnswerRe: HTML5: Local Data Base. Pin
Simewu15-Jun-15 12:38
professionalSimewu15-Jun-15 12:38 
Questionproblem to check value array Pin
Loei Maleki4-Jun-15 1:52
Loei Maleki4-Jun-15 1:52 
AnswerRe: problem to check value array Pin
Loei Maleki4-Jun-15 1:57
Loei Maleki4-Jun-15 1:57 
QuestionCan't find where is the error from Pin
newbiejo2-Jun-15 22:50
newbiejo2-Jun-15 22:50 
I've 3 php files,
1.converter.php // controllers/converter.php
PHP
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Converter extends CI_Controller{
	function __construct(){
		parent::__construct();
		$this->load->helper(array('url','form'));
	}
	
	function index(){
		$this->load->view('menu_converter');
	}
	
	function biner(){
		$this->load->library('form_validation');
		$this->form_validation->set_rules('n1', 'Number1', 'required|integer');
		if ($this->form_validation->run()){
			$data['n1']=(int)$this->input->post('n1', true);
			$data['hasil']=decbin((int)$data['n1']);
		}
		else{
			$n1=0;
		}
		$this->load->view('biner',$data);
	}
}
?>

2.menu_converter.php // view/menu_converter.php
PHP
<<pre lang="xml">html>
<head><title>Aplikasi Converter Bilangan</title>
</head>
<body>
    <h1>CodeIgniter 2.0 and Form!</h1>
<p>Silahkan pilih menu di bawah ini.</p>
<ul>
    <li><?php echo anchor('index.php/converter/biner/','Biner');?>
</ul>
<p><br/>Page rendered in {elapsed_time} seconds</p>
</body>
</html></pre>
3.biner.php // view/biner.php

HTML
<html>
<head><title></title>
</head>
<body>
	<h1>Converter</h1>
	<?php echo validation_errors();?>
	<p>Silahkan masukkan data berikut!</p>
	<?php echo form_open('index.php/converter/biner');?>
	<?php echo form_input('n1',$n1);?>
	<?php echo form_submit('submit','Hitung!!');?>
	<?php echo form_close();?><br>
	Hasil: <?php echo $hasil;?>
	<p><br/>Page rendered in {elapsed_time} seconds</p>
</body>
</html>

I'm using CodeIgniter. Everytime i run the "index.php/converter" on my browser, it keeps show error when trying to load "biner.php" view file. I hope someone can help me finding if there's something i've missed. Thank you.
QuestionUnable to stop SQL injection errors. Pin
Stephen Holdorf29-May-15 2:10
Stephen Holdorf29-May-15 2:10 
AnswerRe: Unable to stop SQL injection errors. Pin
Sascha Lefèvre29-May-15 2:55
professionalSascha Lefèvre29-May-15 2:55 
GeneralRe: Unable to stop SQL injection errors. Pin
Stephen Holdorf29-May-15 4:03
Stephen Holdorf29-May-15 4:03 
GeneralRe: Unable to stop SQL injection errors. Pin
Sascha Lefèvre29-May-15 4:10
professionalSascha Lefèvre29-May-15 4:10 
GeneralRe: Unable to stop SQL injection errors. Pin
Richard Deeming29-May-15 4:11
mveRichard Deeming29-May-15 4:11 
GeneralRe: Unable to stop SQL injection errors. Pin
Stephen Holdorf29-May-15 8:55
Stephen Holdorf29-May-15 8:55 
GeneralRe: Unable to stop SQL injection errors. Pin
Richard Deeming29-May-15 9:14
mveRichard Deeming29-May-15 9:14 
GeneralRe: Unable to stop SQL injection errors. Pin
Sascha Lefèvre29-May-15 12:55
professionalSascha Lefèvre29-May-15 12:55 
QuestionHow to get my "wp_nav_menu()" function working Pin
Truck5328-May-15 16:34
Truck5328-May-15 16:34 
QuestionHost Windows Class Library in PHP Pin
Jassim Rahma27-May-15 0:49
Jassim Rahma27-May-15 0:49 
QuestionMessage Removed Pin
22-May-15 4:28
Antonio Guedes22-May-15 4:28 
QuestionOpening an existing project in WordPress Pin
indian14321-May-15 21:21
indian14321-May-15 21:21 
AnswerRe: Opening an existing project in WordPress Pin
User 171649221-May-15 22:11
professionalUser 171649221-May-15 22:11 
QuestionImproper Neutralization of special elements used in an sql command Pin
Stephen Holdorf12-May-15 10:09
Stephen Holdorf12-May-15 10:09 
AnswerRe: Improper Neutralization of special elements used in an sql command Pin
Sascha Lefèvre12-May-15 10:33
professionalSascha Lefèvre12-May-15 10:33 
GeneralRe: Improper Neutralization of special elements used in an sql command Pin
Steve Holdorf12-May-15 12:38
Steve Holdorf12-May-15 12:38 
GeneralRe: Improper Neutralization of special elements used in an sql command Pin
Sascha Lefèvre12-May-15 12:54
professionalSascha Lefèvre12-May-15 12:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.