Jump to content

Get inputs, concatenate them, and define as PHP variable without reloading?


Repgahroll

Recommended Posts

Hello there.

 

I'm learning Joomla, and the following lines works well to store "myvar" on database.

 

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

 

However, i want to store more than one input, so i wonder if it's possible to do something using javascript.

 

For example

 

<input type="text" name="myvara" value=""/>
<input type="text" name="myvarb" value=""/>

--some way to concatenate "on the fly" myvara+","+myvarb into myvar--

--some way to make it readable for php as "myvar" on input name above--

<?php $this->user->myvar = $myvar; ?>

 

Thanks in advance.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.