PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Ive a function that creates a table displaying the data from a passed RecordSet(RS). one of the columns in the table needs to be populated by creating a new second RS which uses data from the first RS in its WHERE clause.
when i try to create this second RS i get an error saying that the database connection string is invalid?! i am positive that the connection string is valid as its used in other parts of the page's script.
This reason for this error seems to be my trying to create the RS in a function?!! can anyone give me some advice on this please? can u create an RS in a function?
many thanks for any help
the error is:
Notice: Undefined variable: database_database_connection in somepage.php on line 428
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
hey Lettie,
cant show u the full thing cos its actually a huge form, but the important part is below. thanks for any advice
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
its ok, got it working, im feckin stupid all i needed to do was to pass a reference to the connection variables to the function! i cant believe i didnt think of that sooner! sorry to waste every1s time!