Jump to content

this form wont passing the numeric value


zgkhoo

Recommended Posts

part of the code

<?php
if(isset($_POST[click])){ 
echo "<br>exchange clicked";
echo "</br>expoint=".$_P0ST[point];

  //$sql="INSERT INTO gptran (TranDate,Mode,UserID,TranPoint,Purpose,FromWhere,ToWhere)
     //       VALUES
    //  (NOW(),'Debit','$login',$_P0ST[Expoint],'EXCHANGE2CASH','UserPoint','UserCash')";
    //   mysql_query($sql);
       
     //  $sql="INSERT INTO gptran (GpTID,TranDate,Mode,UserID,TranPoint,Purpose,FromWhere,ToWhere)
     //       VALUES
     // (lastGpTID(),NOW(),'Debit','$login',$_P0ST[expoint],'EXCHANGE2CASH','UserPoint','UserCash')";
     //  mysql_query($sql);

}






?>


<html>  
<form action="displaygamep.php" method="POST">
<input type="text" name="point">
<input type="submit" name="click">
</form>
</html>


 

which this

echo "</br>expoint=".$_P0ST[point];

showing nothing...

wat happen?

???

Link to comment
Share on other sites

<?php

$login=$_SESSION['UserID'];
$login=1009;

include '../../../config.php';
include '../../../opendb.php';
echo "</br>login=".$login;
echo "calculate ur total game point";
$totalpoint=0;




echo "show all ur gamepoint,and total it up !";
echo"<left><table border=1><tr>
<td>GpTID</td><td>TranDate</td><td>Mode</td><td>UserID</td><td>CardSerial</td><td>Point Earn</td><td>Purpose</td><td>BenefitFrom</td><td>BenefitFlevel</td></tr>";

//finding all card that owner owned
$result=mysql_query("SELECT * from gptran WHERE UserID='$login'")or die('Query failed: ' . mysql_error());
while($row = mysql_fetch_array($result,MYSQL_ASSOC)){


     echo "<tr><td>$row[GpTID]</td><td>$row[TranDate]</td><td>$row[Mode]</td><td>$row[userID]</td><td>$row[CardSerial]</td><td>$row[TranPoint]</td><td>$row[Purpose]</td><td>$row[benefitFrom]</td><td>$row[benefitFlevel]</td></tr>";
     $totalpoint+=$row[TranPoint];



}//end while


echo "</br> Your total game point=".$totalpoint;

echo "</table></left>";


function lastGpTID(){ //finding the lastGpTID in DB
    	echo "</br></br>enter last gpTID function";
    	$result2=mysql_query("SELECT * from dbstore");
    	while($row2 = mysql_fetch_array($result2,MYSQL_ASSOC)){
    		return $row2[LastGpTID];
    	}
    	
}


if(isset($_POST[click])){ 
echo "<br>exchange clicked";
echo "</br>expoint=".$_P0ST['point'];
echo "</br>test=".$_P0ST[test];

  //$sql="INSERT INTO gptran (TranDate,Mode,UserID,TranPoint,Purpose,FromWhere,ToWhere)
     //       VALUES
    //  (NOW(),'Debit','$login',$_P0ST[Expoint],'EXCHANGE2CASH','UserPoint','UserCash')";
    //   mysql_query($sql);
       
     //  $sql="INSERT INTO gptran (GpTID,TranDate,Mode,UserID,TranPoint,Purpose,FromWhere,ToWhere)
     //       VALUES
     // (lastGpTID(),NOW(),'Debit','$login',$_P0ST[expoint],'EXCHANGE2CASH','UserPoint','UserCash')";
     //  mysql_query($sql);

}






?>


<html>  
<form action="displaygamep.php" method="POST">
<input type="text" name="point">
<Input type="text" name="test">
<input type="submit" name="click">
</form>
</html>

i changed...still the same

 

output after i input number and click the submit button:

exchange clicked

expoint=

 

weird.. ??? ??? ???

 

 

 

 

 

 

Link to comment
Share on other sites

You have had this same issue before $_POST has a the letter O (naught) in it, not the number 0 (zero).

 

You really need to turn on error reporting. Place this at the top of ALL your scripts in the future.

 

<?php error_reporting(E_ALL); ini_set('display_errors','1'); ?>

Link to comment
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.