[advanced search]
 

Go Back   NamePros.com > Discussion > Web Design & Development > Programming

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.


Closed Thread
 
LinkBack Thread Tools
Old 05-10-2006, 01:16 PM   #1 (permalink)
NamePros Regular
 
bigboss's Avatar
 
Join Date: May 2003
Location: On a Farm in Wisconsin
Posts: 478
53.20 NP$ (Donate)

bigboss has a spectacular aura aboutbigboss has a spectacular aura about


Need Help Getting Image on Top of Page

I tried to get an image on top of the page using $top in my config.php

Code:
///Header HTML
         $top ="img src=images/5dmlogo.jpg";
How do I direct the $top to my image

I am super new to php

The site I am working on is www.rizma.com/5dm

Thanks For The Help

John
bigboss is offline  
Old 05-10-2006, 02:02 PM   #2 (permalink)
Senior Member
 
Shorty's Avatar
 
Join Date: Sep 2005
Location: England
Posts: 1,035
102.05 NP$ (Donate)

Shorty is just really niceShorty is just really niceShorty is just really niceShorty is just really nice


echo "<$top>";
Shorty is offline  
Old 05-10-2006, 02:52 PM   #3 (permalink)
NamePros Regular
 
bigboss's Avatar
 
Join Date: May 2003
Location: On a Farm in Wisconsin
Posts: 478
53.20 NP$ (Donate)

bigboss has a spectacular aura aboutbigboss has a spectacular aura about


Quote:
Originally Posted by Shorty
echo "<$top>";
Well I tried that and got an error

I need the line in red $top ="img src=images/5dmlogo.jpg";

How do I direct it to my image?

Thanks John
bigboss is offline  
Old 05-10-2006, 03:07 PM   #4 (permalink)
Senior Member
 
Shorty's Avatar
 
Join Date: Sep 2005
Location: England
Posts: 1,035
102.05 NP$ (Donate)

Shorty is just really niceShorty is just really niceShorty is just really niceShorty is just really nice


Is there any particular reason you have to do it with a variable?

Can't you just do:
Code:
echo '<img src=images/5dmlogo.jpg>';
?
Shorty is offline  
Old 05-10-2006, 04:26 PM   #5 (permalink)
NamePros Member
 
Join Date: Mar 2006
Location: (US) Missouri
Posts: 43
0.00 NP$ (Donate)

Hobnob is an unknown quantity at this point


I fail to see why:

<<?=$top;?>>

does not work.. Paste the code you have that is trying to call the picture

Here, I will show you an example that works, maybe it will help you.

Code:
<? $teehee = "img src=/odditysoftware/scripts/us-apartments-script/images/3.gif"; ?>
<<?=$teehee;?>>
oh, i looked at your source you have:


<p align="center">img src=images/5dmlogo.jpg</p>

change the <p align="center"> and the </p> to just < and >

Last edited by Hobnob; 05-10-2006 at 04:29 PM.
Hobnob is offline  
Old 05-10-2006, 04:46 PM   #6 (permalink)
JYM
Senior Member
 
JYM's Avatar
 
Join Date: Sep 2005
Location: San Diego, California
Posts: 1,078
87.41 NP$ (Donate)

JYM is a glorious beacon of lightJYM is a glorious beacon of lightJYM is a glorious beacon of lightJYM is a glorious beacon of lightJYM is a glorious beacon of light


What if you did this:

<div style="position: absolute; top: 0;">$top</div>
__________________
Ipzy.com - Free Proxy to visit Myspace/Facebook, Tech News, and more!
Onlineness.com - Free Proxy
FOR SALE: support.im | tradepile.com
JYM is offline  
Old 05-10-2006, 04:51 PM   #7 (permalink)
Dan
Buy my domains.
 
Dan's Avatar
 
Join Date: Feb 2006
Posts: 2,801
56.00 NP$ (Donate)

Dan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant future

Autism Autism Autism Autism Autism Autism Autism
Just make it:

$top = "<img src='images/5dmlogo.jpg'>";
Dan is offline  
Old 05-10-2006, 04:59 PM   #8 (permalink)
NamePros Member
 
Join Date: Mar 2006
Location: (US) Missouri
Posts: 43
0.00 NP$ (Donate)

Hobnob is an unknown quantity at this point


Quote:
Originally Posted by JYM
What if you did this:

<div style="position: absolute; top: 0;">$top</div>
because an image is enclosed in a "<" and a ">" tag, he does not have them in his code, he is just echoing the source.
Hobnob is offline  
Old 05-10-2006, 05:10 PM   #9 (permalink)
Dan
Buy my domains.
 
Dan's Avatar
 
Join Date: Feb 2006
Posts: 2,801
56.00 NP$ (Donate)

Dan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant future

Autism Autism Autism Autism Autism Autism Autism
Hobnob, your sentence makes no sense but I know what you are trying to say.

All he has is > img src=someimage < but there is no image tag because he doesn't have a < and a >

All he has to do is add those.
Dan is offline  
Old 05-10-2006, 07:27 PM   #10 (permalink)
NamePros Regular
 
bigboss's Avatar
 
Join Date: May 2003
Location: On a Farm in Wisconsin
Posts: 478
53.20 NP$ (Donate)

bigboss has a spectacular aura aboutbigboss has a spectacular aura about


Quote:
Originally Posted by Dan Friedman
Just make it:

$top = "<img src='images/5dmlogo.jpg'>";
Thanks Dan this one worked

John
bigboss is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Site Sponsors
Advertise your business at NamePros

All times are GMT -7. The time now is 10:23 PM.


Powered by: vBulletin® Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0
Template-Modifications by TMS
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85