fareedreg Posted January 24, 2010 Share Posted January 24, 2010 i am having $val=10 in first.php. In second php when i m trying to access this value.. its shows me NULL value.. any reason?? Quote Link to comment Share on other sites More sharing options...
Alex Posted January 24, 2010 Share Posted January 24, 2010 Are you including first.php in second.php or what? Quote Link to comment Share on other sites More sharing options...
fareedreg Posted January 24, 2010 Author Share Posted January 24, 2010 I m submitting form with the help of submit button... Are you including first.php in second.php or what? Quote Link to comment Share on other sites More sharing options...
Alex Posted January 24, 2010 Share Posted January 24, 2010 That really doesn't help. Can you post the source to the two files? Quote Link to comment Share on other sites More sharing options...
fareedreg Posted January 24, 2010 Author Share Posted January 24, 2010 have a look at first.php $idval=1; include('connect.php'); $Tb = "mem_depo"; mysql_select_db($Db, $link); $query = "select id from mem_depo order by id"; $result= mysql_query($query,$link); while ($row=mysql_fetch_array($result)) { $f1=$row["id"]; } if ($f1>=1) { $idval=$f1+1; ''''''''''''''''''''''''''''variable which i would like to access in second.php } mysql_close($link); include('style.php'); $val=$_POST["itemmem"]; include('balance.php'); ?> second.php $depid = $_POST['idval']; '''''''''''''''''this is coming null $memid = $_POST["txtmemid"]; $depamt = $_POST["txtdepamt"]; $tmy = $_POST["txtdepyy"]; $tmm = $_POST["txtdepmm"]; $tmd = $_POST["txtdepdd"]; $tstamp = ("$tmy-"."$tmm-"."$tmd"); Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted January 24, 2010 Share Posted January 24, 2010 Need to see more code than that. Where is you form? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.