Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:20

Integrating php into the menu


Poster: tubize
Dated: Sunday July 11 2004 - 13:51:30 BST

I am doing something again with the menu that once again takes me in a bit over my head. I have purchased an Amazon store that is programmed in php but they have a separate directory of html files that I can use to modify the look and feel. I am starting out by putting it on the AWCB site and have had pretty good luck in integrating the menu so far and even making it dynamic with cold fusion.

Here is where I am with it. http://www.awcb.org/club/awcb/amazon_new/index.php

What I have done here is quite different (for me) but it works:

1. The menu is called nav_amazon.cfm because it has cold fusion in it.
2. I have used a javascript include to bring the menu onto the page
3. The database is in MYSQL and I am bringing up the categories in the menu using a Cold Fusion query.

I am having a couple of problems.

Search form
You will notice under the Search Amazon link that I have two sub-menus, the third one being the search form: It displays fine as you can see but I am having a real problem in incorporating some variables in the form.

The coding I use for the search form is as follows:

aI("text=<FORM METHOD=GET ACTION=search.php name=search><table><tr><td><input name=keyword size=11></td></tr><tr><td><input type=submit value=Search></td></tr></table></form>;type=form;align=center;");

The php version of the search form looks like this:

<form name="form1" method="get" action="search.php">
<td colspan="2" class="blue" style="padding-left:10px;" height="26"><strong>Sort By :</strong>
<input type="hidden" name="query" id="query" value="{QUERY}">
<input type="hidden" name="mode" id="mode" value="{MODE}">
<input type="hidden" name="type" id="type" value="{TYPE}">
<select name="sort">
<option value="titlerank" {TITL_SEL}>Alphabetical</option>
<option value="salesrank" {BEST_SEL}>Bestselling</option>
<option value="pricerank" {PRIC_SEL}>Price</option>
</select>
<input name="imageField" type="image" src="templates/{TPL_NAME}/images/sort.gif" width="35" height="14" border="0"></td></form>

The first problem is the menu does not display at all when I insert the hidden fields in the menu code.

The second problem comes when I try to replace the SUBMIT button with an image.

Can anyone help me with the above two problems?

You will find a copy of the original program on this page.
http://demo.ghostscripter.com/amazon/index.php?lang=uk


Poster: Ruth
Dated: Monday July 12 2004 - 14:30:35 BST

Here are some links to topics that may help you, though I don't know anything about forms much less cold fusion.

http://www.milonic.com/forum/viewtopic.php?t=4045

http://www.milonic.com/forum/viewtopic.php?p=17775

http://www.milonic.com/forum/viewtopic.php?p=17018

http://www.milonic.com/forum/viewtopic.php?p=16944

Ruth


Poster: Andy
Dated: Monday July 12 2004 - 18:05:57 BST

The server may have been configured to only parse PHP through .php files. Because you have named your file .cfm PHP will ignore it. This could be why the PHP code isn't being executed.

Do you have full control over the server - What you may need to do is configure the webserver to parse .cfm files as PHP. Let me know if you need to php config command for this and I'll dig it out

Cheers
Andy