solon Posted October 18, 2008 Share Posted October 18, 2008 Hey guys i have a form that is displayed within php like : (echo "<form..." and in the form i have a text box that i want to multiply its value with the values coming out of a specified filed from the table. how can i pass that value within the php function and to keep that value in the text box? Thanks in advance Link to comment https://forums.phpfreaks.com/topic/128958-multiplication-problem/ Share on other sites More sharing options...
genericnumber1 Posted October 18, 2008 Share Posted October 18, 2008 You could use ajax to retrieve the values, or just allow the normal post action of the form and echo the user's input between the textbox open/close tags (or value attribute if it's an input tag). Of course you'll need to make sure their input is indeed a number like is expected (see: is_numeric()) Link to comment https://forums.phpfreaks.com/topic/128958-multiplication-problem/#findComment-668685 Share on other sites More sharing options...
hitman6003 Posted November 2, 2008 Share Posted November 2, 2008 Why not just do the math client side with javascript? Link to comment https://forums.phpfreaks.com/topic/128958-multiplication-problem/#findComment-680306 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.