Rommeo Posted January 1, 2008 Share Posted January 1, 2008 Hi i m trying to write a program about simple membership system and i wanna send the data to "addmember.php ". But i cant send the data by address .. Let me explain ; here is what i wanna do : <?php // $i is the data taken from DB = membership status $i = $i + 5; ?> <----html starts here -----> <form method="post" action="addmember.php"> <input name="name" type="text" id="name"> <input name="surname" type="text" id="surname"> . <---------possible to send $i here ? ------> . </form> i cant send $i value by address(GET), cant send it by POST cause user does not enter anything.( as i know, i m a newbie btw ). So what else i can do to send it to addmember.php ? i ll be glad if you can help. Thanx in advance. Quote Link to comment https://forums.phpfreaks.com/topic/83988-solved-sending-data-by-not-using-forum-or-get/ Share on other sites More sharing options...
kopytko Posted January 1, 2008 Share Posted January 1, 2008 I don't understand your problem. I suppose that you want to do this: <?php // $i is the data taken from DB = membership status $i = $i + 5; ?> <----html starts here -----> <form method="post" action="addmember.php"> <input name="name" type="text" id="name"> <input name="surname" type="text" id="surname"> <---------------------------- $i variable -----------------------------> <?=$i?> . </form> Quote Link to comment https://forums.phpfreaks.com/topic/83988-solved-sending-data-by-not-using-forum-or-get/#findComment-427395 Share on other sites More sharing options...
sasa Posted January 1, 2008 Share Posted January 1, 2008 try <input type="hidden" name="i" value="<?=$i?>" /> Quote Link to comment https://forums.phpfreaks.com/topic/83988-solved-sending-data-by-not-using-forum-or-get/#findComment-427398 Share on other sites More sharing options...
trq Posted January 1, 2008 Share Posted January 1, 2008 I think your looking for the curl extension. Quote Link to comment https://forums.phpfreaks.com/topic/83988-solved-sending-data-by-not-using-forum-or-get/#findComment-427399 Share on other sites More sharing options...
JJohnsenDK Posted January 1, 2008 Share Posted January 1, 2008 you diffently want to use the hidden type in the form, it would be the eaisest way. You could also use sessions. $_SESSION['i'] = $i; And then get it on the ohter page. $i = $_SESSION['$i']; but this requeries that you start your session in the top of the script. Quote Link to comment https://forums.phpfreaks.com/topic/83988-solved-sending-data-by-not-using-forum-or-get/#findComment-427400 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.