A weird, difficult session fatal error.
am 11.01.2011 19:09:56 von Bill Mudry--=====================_-2013304848==.ALT
Content-Type: text/plain; charset="us-ascii"; format=flowed
Lately I have been learning how to use 'sessions' (with some degree
of success) for transferring parameters between pages. I have come
across a new error report that is so weird that I would not be able
to envision how I could do a Google search to find what is happening.
I am so close ----- and (so far) so far away from being able to
display images in a pop-up window. [U]First, some background to get
you going.[/U] [B][COLOR="Green"]The website is at
[url]www.prowebcanada.com/taxa[/url].[/COLOR][/B] On the left side
menu, clicking on 'Woody Species' will bring up a huge list of over
15,000 botanical wood names. Each is linked to bring up (dynamically)
a data sheet on the specific wood chosen. Some woods show a picture
(scan) of the wood, some do not have one. Just below that picture
area (scan present or absent) are three buttons to bring up three
pop-up windows: [B]Photomicrographs [/B] [B]More Photos[/B] [B]U.V.
Fluoresence[/B] Each of the new windows are planned to show the
content of the titles. To get the appropriate image to show for the
currently chosen wood requires supporting code to sort through stored
photos and images and to display it. I chose to do the development
first on the 'U.V. Fluorescence' pop-up. (Incidentally, I have found
that as much as 10% - 15% of the 3,000 woods in my collection will
actually glow under ultraviolet light and I found that I can
photograph this). Once I get any one of these windows working OK, it
will become much easier to get all three pop-ups to display their
images. Each of these pop-up pages start with a session start
statement so it can find what the currently chosen botanical name is.
The page starts with a title of: Woody Species (botanical name of the
wood) An example would be Woody Species Acacia aneura When you pick a
different wood, the page successfully changes the title to reflect
the name of the newly chosen wood. That shows that the session is at
least working properly. [I]The Problem[/I] I get no errors on
connecting to the database. Even the SELECT statement is read OK with
no errors. When I bypass the path and file name coming from the
database by hard coding it, the picture shows fine(!). However --
when I instead try to go the next step with a mysql_query statement,
I get a really weird and fatal error (no window forms) reporting of:
"You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use
near 'aneura' at line 3". However, all there is at line 3 is:
"session_start();" No mention of 'aneura' is made at all.
Furthermore, all species names are made from two words (not one). The
current correct species name actually is Acacia aneura, so the error
has to be related to the hidden value in the session. I have NO IDEA
how to fix this or what the system actually is complaining about. I
will leave the page hard wired for now so anyone can see the
objective of how I want the page to show. I will also include the
source code below for the page. What is happening? Has anyone come
across an error like this? I doubt I would be able to know what to
search for on the Net for this one. Even MORE important ----- How can
I get this page to display the right photo for a pre-chosen botanical
name? If you need more information I am glad to send it. (recall that
if I get this working, two other pop-ups will also become easier to
finish off). (Once again, fingers and toes crossed!) Bill Mudry
Mississauga, Ontario
------------------------------------------------------------ ----------------------
[CODE]
Webmaster: This function is still Under Construction
[/CODE]
--=====================_-2013304848==.ALT--