Have no idea how such simple thing can not work :(

<form action = "<?php echo base_url()?>admin_/groups/preview" target = "">
				<strong>Pavadinimas: </strong><br>
				<input type="text" name="title" /><br><br>
				<strong>Tekstas: </strong><br>
				<textarea name = "text" cols = "90" rows = "90"></textarea><br>
				<input class = "save" type="button" name="submit" value = "Išsaugoti"/>
				<input class = "preview" type="submit" name="preview" value = "Peržiūrėti" />

I press the button which class is preview, it calls the right function.

function preview()
		echo $this->input->post('title');
		//echo stripslashes($_POST['text']);

But this function does not echo anything. Can you help me?

Edit: I forget that my codeignitet is actually 1.7.3 but I gueess this does not matter.

Recommended Answers

All 2 Replies

<form action = "<?php echo base_url()?>admin_/groups/preview" target = "">

replace with

<form method="post" action = "<?php echo base_url()?>admin_/groups/preview" target = "">

Yeah :) this morning I just found that mistake :) yesterday probably was too tired to notice that. And ususally I use echo form_open() function, so probalby it adds the method attribute itself automatically, but this time I created the form manually and forgot :) thanks for the response.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.