FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » LINKING A PHP FILE WITH <li> MENU OPTIONS...
Show: Today's Messages :: Unread Messages :: Show Polls :: Message Navigator
| Subscribe to topic | Bookmark topic 
Switch to threaded view of this topic Create a new topic Submit Reply
LINKING A PHP FILE WITH <li> MENU OPTIONS... [message #180441] Fri, 15 February 2013 10:35 Go to next message
Nagaraju Kachapuram is currently offline  Nagaraju Kachapuram
Messages: 14
Registered: February 2013
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
Hi all,

I have created a cascading menu like following and of course new to php and mysql... the main.php file will fetch data from a mysql database...


<ul id="nav" style="float:left; clear:both;" name="citycode">
<li><a href="#"><b>City List</b></a>
<ul>
<li value="398A" ><a href="main.php">BEEJING</a></li>
<li value="125B" ><a href="#">NEWYORK </a></li>
<li value="734C" ><a href="#">ADELLAIDE </a></li>
<li value="859D"><a href="#">MELBOURNE </a></li>
</ul>
</li>

My problem is when I click on the city list it wil open main.php according to the city value code. But the above code is opening a blank main.php file with headers. How to change the above to accept the city code to open main.php

The main.php few lines..


html>
<body>
<body bgcolor="#D8AF92">
<?php
$citycode=$_REQUEST['citycode'];
include("dbconnect.php");
----
----
----


Thank you.
Re: LINKING A PHP FILE WITH <li> MENU OPTIONS... [message #180442 is a reply to message #180441] Fri, 15 February 2013 10:46 Go to previous messageGo to next message
JohnT is currently offline  JohnT
Messages: 16
Registered: April 2011
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
On Fri, 15 Feb 2013 07:35:33 -0800, Nagaraju Kachapuram wrote:

> Hi all,
>
> I have created a cascading menu like following and of course new to php
> and mysql... the main.php file will fetch data from a mysql database...
>
>
> <ul id="nav" style="float:left; clear:both;" name="citycode">
> <li><a href="#"><b>City List</b></a>
> <ul>
> <li value="398A" ><a href="main.php">BEEJING</a></li> <li
> value="125B" ><a href="#">NEWYORK </a></li> <li value="734C"
>> <a href="#">ADELLAIDE </a></li> <li value="859D"><a
> href="#">MELBOURNE </a></li>
> </ul>
> </li>
>
> My problem is when I click on the city list it wil open main.php
> according to the city value code. But the above code is opening a blank
> main.php file with headers. How to change the above to accept the city
> code to open main.php

You need to add the city code to the URL:

<li value="398A" ><a href="main.php?citycode=398A">BEEJING</a></li>


JohnT
Re: LINKING A PHP FILE WITH <li> MENU OPTIONS... [message #180443 is a reply to message #180442] Fri, 15 February 2013 13:26 Go to previous message
Nagaraju Kachapuram is currently offline  Nagaraju Kachapuram
Messages: 14
Registered: February 2013
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
On Friday, 15 February 2013 21:16:51 UTC+5:30, JohnT wrote:
> On Fri, 15 Feb 2013 07:35:33 -0800, Nagaraju Kachapuram wrote:
>
>
>
>> Hi all,
>
>>
>
>> I have created a cascading menu like following and of course new to php
>
>> and mysql... the main.php file will fetch data from a mysql database...
>
>>
>
>>
>
>> <ul id="nav" style="float:left; clear:both;" name="citycode">
>
>> <li><a href="#"><b>City List</b></a>
>
>> <ul>
>
>> <li value="398A" ><a href="main.php">BEEJING</a></li> <li
>
>> value="125B" ><a href="#">NEWYORK </a></li> <li value="734C"
>
>>> <a href="#">ADELLAIDE </a></li> <li value="859D"><a
>
>> href="#">MELBOURNE </a></li>
>
>> </ul>
>
>> </li>
>
>>
>
>> My problem is when I click on the city list it wil open main.php
>
>> according to the city value code. But the above code is opening a blank
>
>> main.php file with headers. How to change the above to accept the city
>
>> code to open main.php
>
>
>
> You need to add the city code to the URL:
>
>
>
> <li value="398A" ><a href="main.php?citycode=398A">BEEJING</a></li>
>
>
>
>
>
> JohnT

Thank you a lot!! It worked!!
Quick Reply
Formatting Tools:   
  Switch to threaded view of this topic Create a new topic
Previous Topic: There’s a new free innovative PHP shopping cart from Japan called EC-CUBE
Next Topic: Innovative and advanced issue
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Oct 21 23:01:41 EDT 2017

Total time taken to generate the page: 0.00667 seconds