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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.