Welcome Guest, Not a member yet? Register   Sign In
a way to retrive input field name value
#1

[eluser]harrywilson[/eluser]
for example:

<input type="text" name="myText" value="<?php echo $this->name;?>" />

so the value will become myText.

is there such a function or way to do this?

thanks
#2

[eluser]weboap[/eluser]
checkout the guide :
http://ellislab.com/codeigniter/user-gui...elper.html

#3

[eluser]Samus[/eluser]
[quote author="harrywilson" date="1337397599"]for example:

<input type="text" name="myText" value="<?php echo $this->name;?>" />

so the value will become myText.

is there such a function or way to do this?

thanks[/quote]
Code:
<input type="text" name="myText" value="<?php echo set_value('myText', 'Default value'); ?>" />

The first parameter says that it will fill the input with the value of the user entered after form submit. Second param says if the user has not filled the form with anything, give it a default value of 'Default value'.

The first param is required, second is optional.

But as the guy above me says, read the userguide. This is clearly documented there.
#4

[eluser]harrywilson[/eluser]
thank you guys so much. this is the solution I am looking for.




Theme © iAndrew 2016 - Forum software by © MyBB