Forum Moderators: coopster
I've used some JavaScript to calculate some figures (because it would of been a nightmare to do it using PHP), however I've used document.write to output the final output.
How do I convert this bit code to PHP? The reason being is because I want to place this figure in the database.
I want to place 'value' into the DB.
<SCRIPT LANGUAGE="JavaScript">
document.write( value + "%");
</script>
Any ideas?
Thanks in advance
// JavaScript
document.formName.fieldName.value = value + "%"
// Or, if you're creating the Web page from JavaScript
document.write ('<form name="formName"><input type="hidden" name="fieldName" value="' + value + '"><input type="submit"></form>"
Then just submit it to the PHP page to process the form input.