So far so good. Then I have tried to add something like this:' />But that doesn't work just like a bunch of different variations doesn't. Can you see what I do wrong?Niels"> Hidden field from variable - Forums

Forums

Hidden field from variable

nielskliim 19 May, 2013
I ran a plugin that added a new form to the articles edit page (the expandable ones on the right side). For some reason the plugin ads three new fields to the #__user_profiles to store the information.

I try to use the new form for saving an amount which later on is to be sent to DIBS as a hidden element - but I have some serious problems.

I've managed to load the amount and echoed it to the page so I can show it to the costumers:

<?php
$code=JRequest::getVar('id');

$result = mysqli_query($con,"SELECT * FROM vb_user_profiles WHERE user_id=$code AND ordering=1");

while($row = mysqli_fetch_array($result))
echo $row['profile_value'] ;

mysqli_close($con);

?>

So far so good. Then I have tried to add something like this:

<input type='hidden' name='amount' id='title' amount='<?php echo $row['profile_value'] ; ?>' />

But that doesn't work just like a bunch of different variations doesn't. Can you see what I do wrong?

Niels
the_fitz 27 Jun, 2013

<input type='hidden' name='amount' id='title' amount='<?php echo $row['profile_value'] ; ?>' />

But that doesn't work just like a bunch of different variations doesn't. Can you see what I do wrong?

Niels



it should be
<input type='hidden' name='amount' id='title' value='<?php echo $row['profile_value'] ; ?>' />

the correct word to use is VALUE not AMOUNT.
Mr Fitz
This topic is locked and no more replies can be posted.