Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Website Design Forum


You are currently viewing our Website Design Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Problem running PHP inside PHP
Old 12-18-2004, 05:42 PM Problem running PHP inside PHP
Junior Talker

Posts: 36
Trades: 0
I think there has got to be an easy solution to this one:

I have two PHP programs. One (we'll call it progy1) displays the information from a database without conditions. My other program (progy2) has been writen by me to check the database records and check to see if a record should get displayed by progy1 (progy2 goes through all the records using a loop, checks that a field matches the area the user is in, and if there is a match I do a include/require of progy2).

Both programs run fine on their own. However, the call for progy1 from progy2 causes progy1 to die after the first matching record is found, and the following error is returned:

Quote:
Warning: 1 is not a valid MySQL-Link resource in /home/site/web/poll.php on line 108

Couldn't execute query: 31
poll.php is progy2. Any ideas how I can call/run progy1 in progy2 without running into this problem?
bytech is offline
Reply With Quote
View Public Profile Visit bytech's homepage!
 
 
Register now for full access!
Old 12-19-2004, 02:20 AM Re: Problem running PHP inside PHP
Junior Talker

Posts: 136
Trades: 0
from what little I know.. make sure first that you are calling it at the right location (I suggest first try with them in the same directory, and just putting the filename in the include).. second.. if progy1 is only used when called in progy2, make sure not to have any <?php or ?> commands in progy1...
microski is offline
Reply With Quote
View Public Profile Visit microski's homepage!
 
Old 12-19-2004, 03:01 PM Re: Problem running PHP inside PHP
Junior Talker

Posts: 7
Trades: 0
Put in the full URL so that Prog1 executes before being requested.
imported_Darksat is offline
Reply With Quote
View Public Profile Visit imported_Darksat's homepage!
 
Reply     « Reply to Problem running PHP inside PHP
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 1.31278 seconds with 12 queries