Jump to content

[SOLVED] I can use variables but not display them


skyer2000

Recommended Posts

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?

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.

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!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.