Yesideez Posted December 2, 2006 Share Posted December 2, 2006 Just been playing with something new...I've got a script to read a text box in a form and the menu is comprising of buttons rather than standard links. When a menu button is selected the script reads the text box and stores the contents in a variable. Depending on which menu button is clicked I need to pass the contents of the variable to another script using header("Location: ???.php");I've tried this:[code]$_POST['textbox']=$_POST['textbox'];[/code]But it doesn't work - hope you know what I mean - any ideas?The contents of the text box must not be carried in the URL or a session variable. Quote Link to comment Share on other sites More sharing options...
taith Posted December 2, 2006 Share Posted December 2, 2006 $_POST is a read only variable... the only way you can write in them, is through a submited form. you'd need to use[code]$textbox=$_POST['textbox'];[/code] Quote Link to comment Share on other sites More sharing options...
Yesideez Posted December 2, 2006 Author Share Posted December 2, 2006 Yes I've got that earlier in the script already, was just wondering if there was any way of assigning my own data into $_POST - seems not :( Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted December 2, 2006 Share Posted December 2, 2006 [quote]The contents of the text box must not be carried in the URL or a session variable.[/quote]Why can't you use sessions? That's the logical way of doing this.Ken 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.