logo-dw

Go Back   Dreamweaver Club Forums > Hand Coders Forum > PHP
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 10-09-2011, 08:51 AM   #1
Rob_Che
Rob_Che's Avatar
 
Join Date: Feb 2008
Posts: 1,552
Default Pulling in PHP functions using AJAX (undefined variable errors))

Hi all...

So - This is a wordpress install but I think the problem is general PHP.

What I want to do is pull in the content of a page using jQuery .load.

The problem is that it will pull static content in from content.php it fails when I try and pull a function in. The function works in the page but fails when pulled in.

I get
PHP Code:
Fatal errorCall to undefined function pull_page_in() 
. . .

That's pretty final isn't it? Something to do with global functions or something?

Any help appreciated.
Rob_Che is offline   Reply With Quote
Old 10-09-2011, 09:31 AM   #2
Rob_Che
Rob_Che's Avatar
 
Join Date: Feb 2008
Posts: 1,552
Default

Looks like I'm way off with this... probably best to ignore me for now
Rob_Che is offline   Reply With Quote
Old 10-17-2011, 12:38 PM   #3
davidj
davidj's Avatar
 
Join Date: Sep 2005
Location: The Toon (newcastle upon Tyne)
Posts: 8,256
Default

Cant call a server side function without making a server call
__________________
Would you like to learn PHP from me? Check out -> www.codezenith.co.uk
davidj is offline   Reply With Quote
Old 10-17-2011, 12:40 PM   #4
Rob_Che
Rob_Che's Avatar
 
Join Date: Feb 2008
Posts: 1,552
Default

Yep. I stupidly hadn't included my headers and therefore was calling functions that didn't exist or any connection to the database... N00b.

Hence why it worked fine with HTML but not dynamic content.
Rob_Che is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:05 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com