Jump to content

Value not passing from form


SirChick

Recommended Posts

I have a form where by the user inputs a number and then on the process page it uses the number for processing but when i echo the variable on the process page it is not picking up the value its blank.

 

Here is my form:

 

<form name="" method="POST" action="gymstat.php" id="Form1">
<input type="text" id="Editbox1" style="position:absolute;left:240px;top:53px;width:144px;font-family:Courier;font-size:19px;z-index:0" size="16" name="strength" value="">
<div id="bv_Text11" style="position:absolute;left:109px;top:55px;width:129px;height:19px;z-index:4" align="left">
<font style="font-size:16px" color="#FFFFFF" face="Arial"><b><u>Muscle Strength</u></b></font></div>
<input type="submit" id="Button1" name="Train" value="Train" style="position:absolute;left:338px;top:193px;width:75px;height:24px;z-index:8">

</form>

 

 

Process page:

 


<?
session_start();
include("homeloginvariables.php");

// for later processing
$GetEnergy = mysql_query("SELECT * FROM userregistration
				WHERE UserID='{$_SESSION['Current_User']}'");

	// Fetch the row from the database
if (!($row = mysql_fetch_assoc($GetEnergy))) {
echo "User not found!";
exit;
}

$CurrentEnergy = $row['CurrentEnergy'];

$StrenghInput = mysql_real_escape_string($_POST['strength']);


Echo $StrenthInput;

?>

Link to comment
https://forums.phpfreaks.com/topic/71442-value-not-passing-from-form/
Share on other sites

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.