skyer2000 Posted September 24, 2007 Share Posted September 24, 2007 I'm using jQuery to pass variables from a form to a php script, then back into a div. It passes the variables correctly (i can see it in firebug), and with the variables I am able to update database tables. However, when I try to display anything related to the variables (or even the variables themselves), it just will not display. I put text in the php file and it displayed correctly. I turned on error reporting and got the following Notice: Undefined index: positiontitle in C:\location\test.php on line 4 I looked up that error online but everything says that it means the variable is not defined. If that is the case, how am I able to manipulate database tables with the variable? Any ideas? Quote Link to comment https://forums.phpfreaks.com/topic/70493-solved-i-can-use-variables-but-not-display-them/ Share on other sites More sharing options...
cooldude832 Posted September 24, 2007 Share Posted September 24, 2007 maybe if we saw line 4 we could help. generalyl the line number helps tell you where the error is Quote Link to comment https://forums.phpfreaks.com/topic/70493-solved-i-can-use-variables-but-not-display-them/#findComment-354111 Share on other sites More sharing options...
skyer2000 Posted September 24, 2007 Author Share Posted September 24, 2007 maybe if we saw line 4 we could help. generalyl the line number helps tell you where the error is Line 4 is catching the post $positiontitle = $_POST['positiontitle']; With $positiontitle I can access the database and make updates accordingly. If I try echo $positiontitle; though, I get nothing. Quote Link to comment https://forums.phpfreaks.com/topic/70493-solved-i-can-use-variables-but-not-display-them/#findComment-354121 Share on other sites More sharing options...
darkfreaks Posted September 24, 2007 Share Posted September 24, 2007 try $positiontitle=$_GET['positiontitle']; Quote Link to comment https://forums.phpfreaks.com/topic/70493-solved-i-can-use-variables-but-not-display-them/#findComment-354123 Share on other sites More sharing options...
skyer2000 Posted September 24, 2007 Author Share Posted September 24, 2007 Ah wait a second, I had a mistake with it reloading the php file twice. I spend 2 days trying to figure out whats wrong, finally post here and figure it out in minutes. Sorry to waste your time guys, thanks for the quick responses though! Quote Link to comment https://forums.phpfreaks.com/topic/70493-solved-i-can-use-variables-but-not-display-them/#findComment-354126 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.