| | |||||
| ||||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| Account Closed Join Date: Jul 2005
Posts: 102
![]() ![]() | Image hey guys sup? I need help with inserting images into PHP ![]() I have this Code: <?
nav(".: Home :.",$a,"home");
nav(".: News :.",$b,"news");
nav(".: Services :.",$c,"serv");
nav(".: Portfolio :.",$d,"port");
nav(".: About us :.",$e,"about");
nav(".: Contact us :.",$f,"contact");
?> and when mosue is over (i.e. but1_2.jpg) but mouseover is optional i have tried this way Code: <?
$img1 = "<img src\"images/but1_1.jpg\" />"
?>
<?
nav("$img1",$a,"home");
nav(".: News :.",$b,"news");
nav(".: Services :.",$c,"serv");
nav(".: Portfolio :.",$d,"port");
nav(".: About us :.",$e,"about");
nav(".: Contact us :.",$f,"contact");
?> ????: NamePros.com http://www.namepros.com/programming/127030-image.html Please Someone Help! |
| |
| | #2 (permalink) | ||||
| A Wealth of Knowledge Join Date: Aug 2004
Posts: 3,809
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | This was your code:
PHP Code: | ||||
| |
| | THREAD STARTER #4 (permalink) |
| Account Closed Join Date: Jul 2005
Posts: 102
![]() ![]() | Thanks!! Thanks guys It really helped... may i ask one more quetsion.... How do i add like mouseover..EDIT: When i do this i get an error of some unexpected Variable Code: <?
$img1 = "<img src=\"images/but1_1.jpg\" />"
$img2 = "<img src=\"images/but1_2.jpg\" />"
$img3 = "<img src=\"images/but1_3.jpg\" />"
$img4 = "<img src=\"images/but1_4.jpg\" />"
$img5 = "<img src=\"images/but1_5.jpg\" />"
$img6 = "<img src=\"images/but1_6.jpg\" />"
?>
<?
nav(" . $img1 . ",$a,"home");
nav(" . $img2 . ",$b,"news");
nav(" . $img3 . ",$c,"serv");
nav(" . $img4 . ",$d,"port");
nav(" . $img5 . ",$e,"about");
nav(" . $img6 . ",$f,"contact");
?>
Last edited by Archimed; 09-27-2005 at 05:34 PM.
|
| |
| | #5 (permalink) |
| A Wealth of Knowledge Join Date: Aug 2004
Posts: 3,809
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | Try this: PHP Code: Just a word of advice: When entering PHP code, use the [php] tags. -Steve |
| |
| | THREAD STARTER #6 (permalink) |
| Account Closed Join Date: Jul 2005
Posts: 102
![]() ![]() | Thanks, Again... Took your advice And Btw how do i do the mouse over thing you know.. in php tried this... doesnt work PHP Code: |
| |
| | #7 (permalink) |
| A Wealth of Knowledge Join Date: Aug 2004
Posts: 3,809
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | Well, Mouseovers aren't in PHP, since PHP is a server-side scrippting language. You are going to want something like javascript or CSS to command the client-side web browser .There are some sample scripts out there, I suggest you start with something simple like a BNB script and work your way up. http://bignosebird.com/js/mouse.shtml Hope that helps -Steve |
| |
| | THREAD STARTER #8 (permalink) |
| Account Closed Join Date: Jul 2005
Posts: 102
![]() ![]() | Thanks, stscac You were really good help ![]() I am sorry to ask again This is My Original HTML CODE, Now HTML Code: <tr> <td width="127"><a href="#"><img src="images/but1_1.jpg" name="Image1" width="127" height="27" border="0" id="Image1" onMouseOver="MM_swapImage('Image1','','images/but2_1.jpg',1)" onMouseOut="MM_swapImgRestore()"></a></td> <td width="126"><a href="#"><img src="images/but1_2.jpg" name="Image2" width="126" height="27" border="0" id="Image2" onMouseOver="MM_swapImage('Image2','','images/but2_2.jpg',1)" onMouseOut="MM_swapImgRestore()"></a></td> <td width="128"><a href="#"><img src="images/but1_3.jpg" name="Image3" width="128" height="27" border="0" id="Image3" onMouseOver="MM_swapImage('Image3','','images/but2_3.jpg',1)" onMouseOut="MM_swapImgRestore()"></a></td> <td width="126"><a href="#"><img src="images/but1_4.jpg" name="Image4" width="126" height="27" border="0" id="Image4" onMouseOver="MM_swapImage('Image4','','images/but2_4.jpg',1)" onMouseOut="MM_swapImgRestore()"></a></td> <td width="117"><a href="#"><img src="images/but1_5.jpg" name="Image5" width="129" height="27" border="0" id="Image5" onMouseOver="MM_swapImage('Image5','','images/but2_5.jpg',1)" onMouseOut="MM_swapImgRestore()"></a></td> <td width="136"><a href="#"><img src="images/but1_6.jpg" name="Image6" width="124" height="27" border="0" id="Image6" onMouseOver="MM_swapImage('Image6','','images/but2_6.jpg',1)" onMouseOut="MM_swapImgRestore()"></a></td> </tr> ????: NamePros.com http://www.namepros.com/showthread.php?t=127030 PHP Code: |
| |
| | #9 (permalink) |
| Senior Member Join Date: Mar 2005
Posts: 4,948
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | PHP Code: |
| |
| | #10 (permalink) | ||||
| A Wealth of Knowledge Join Date: Aug 2004
Posts: 3,809
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
????: NamePros.com http://www.namepros.com/showthread.php?t=127030 ![]() Let me know (along with the rest of us) if you have anything else you need help with. -Steve | ||||
| |
| | THREAD STARTER #11 (permalink) |
| Account Closed Join Date: Jul 2005
Posts: 102
![]() ![]() | so like i make a lets say buttons.php and put the code there. and then i just write PHP Code: |
| |
| | #12 (permalink) | ||||
| A Wealth of Knowledge Join Date: Aug 2004
Posts: 3,809
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
-Steve | ||||
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Image hosts, web hosts, free and paid... | dsotmoon | For Sale / Advertising Board | 5 | 07-04-2005 07:23 PM |
| What Keywords? | spy69 | Search Engines | 5 | 06-28-2005 09:05 PM |
| photshop image as site template? | LUCENT | Graphic Design / Flash | 3 | 12-31-2003 02:41 AM |
| making a curve in image and transparent blended layers | scottee | Graphic Design / Flash | 2 | 09-24-2003 10:46 AM |