phpjayx Posted January 6, 2013 Share Posted January 6, 2013 I just switched all my files over to a new server... got everything working..... Except the following, a very simple echo command to get a message over. My debugger shows after the previous page Submit button is sent, message1 is correctly written to.... I'm just confused why this isn't working. Is there an alternate way I could attempt to get message1 written into the field as a default value? <input class="textfield_insert1" id="message1" type="text" placeholder="1st Message" value="<?php echo $message1?>"> Quote Link to comment Share on other sites More sharing options...
haku Posted January 6, 2013 Share Posted January 6, 2013 If you aren't seeing a value, then $message1 is empty. Either that your it's because you don't have a space between $message1 and your closing php tag. Quote Link to comment Share on other sites More sharing options...
Barand Posted January 6, 2013 Share Posted January 6, 2013 Where is $message1 coming from? Did the old server have register_globals ON? http://php.net/manual/en/security.globals.php Quote Link to comment Share on other sites More sharing options...
phpjayx Posted January 6, 2013 Author Share Posted January 6, 2013 The message is coming from a Posting of a previous setup page. My Charles debugger shows its still coming over to the file, I just can't seem to get access to it. I'll take a look at the global settings, that is not something I'm familiar with. Thanks Quote Link to comment Share on other sites More sharing options...
phpjayx Posted January 6, 2013 Author Share Posted January 6, 2013 I looked on my old server and you are correct, the register_globals were turned ON.... I've been looking through that file and I'll admit I'm clueless on what to do.... I've tried some of the random comments in the referenced file... like using GET commands for my variables, still not able to access them... The variable message1 is coming from a form on my Setup.php file, which uses .js with it to push the data over of my MessageCompiler.php file Any suggestions how I grab these variables which were posted to the file... again my debugger says that the file MessageCompiler.php is receiving the variable "message1", but I just don't know how to use it... Quote Link to comment Share on other sites More sharing options...
Barand Posted January 6, 2013 Share Posted January 6, 2013 Have a look at the method attribute in the form tag where message1 originates. If the method is 'post' then you need $message1 = $_POST['message1']; if method is 'get' Then use $_GET instead of $_POST Quote Link to comment Share on other sites More sharing options...
phpjayx Posted January 7, 2013 Author Share Posted January 7, 2013 That was it.... $message1 = $_POST['message1']; Many thanks for the help Cheers 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.