Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.