php/java url question

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!

Moderator: General Moderators

Post Reply
MIGhunter
Forum Newbie
Posts: 13
Joined: Thu Jul 31, 2008 10:49 pm

php/java url question

Post by MIGhunter »

I'm using a php program that uses an array to build a menu. I didn't want to use that menu so I changed it to a java menu that changes the image on rollover (only cause I couldn't figure out how to do it in php.) Now the problem I am having is how to get the url to work and I was hoping someone here would know. Here is how it looks:

Code: Select all

 
array('link' => 'listitems.php' .   $SID . '&' . URI_PAGE . '=history', 'text' => $user->lang['menu_itemhist'],  'check' => 'u_item_list')
 
and the java menu looks like this:

Code: Select all

 
            <p><A 
                HREF=""
                onMouseOver = "rollover('ItemHistory')" 
                onMouseOut  = "rollout('ItemHistory')" 
                ><IMG 
                SRC="http://www.botdls.com/Einherjartues/templates/default/images/NewMenu/ItemHistoryPositive.jpg" 
                NAME="ItemHistory" 
                ALT="Item History" BORDER=0
                height="70" width="66"></A>
                <SCRIPT TYPE="text/javascript">
                <!--
                setrollover("http://www.botdls.com/Einherjartues/templates/default/images/NewMenu/ItemHistoryNegative.jpg");
                //-->
                </SCRIPT>
            </p>
 
Any clue on how to change the HREF="" so that the url will build itself like the php array? Thanks.
WebbieDave
Forum Contributor
Posts: 213
Joined: Sun Jul 15, 2007 7:07 am

Re: php/java url question

Post by WebbieDave »

Maybe something like:

Code: Select all

<?php
$a = array('link' => 'listitems.php' .   $SID . '&' . URI_PAGE . '=history', 'text' => $user->lang['menu_itemhist'],  'check' => 'u_item_list');
?>
<A
    HREF="<?php echo $a['link'] ?>"
    onMouseOver = "rollover('ItemHistory')"
    onMouseOut  = "rollout('ItemHistory')"
>
Post Reply