Welcome, Guest. Please login or register.

Author Topic: PHP question..  (Read 3124 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline TheMagicMTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2857
    • Show all replies
    • http://www.BartonekDragRacing.com
PHP question..
« on: July 12, 2005, 04:39:37 AM »
I'm reading a database and retrieving info.. one piece of info is a name of a file, a picture if you may.

so in html its title

I'm storing the filename in a variable in php called $picture and I will build the url (static url, only filename changes).

How would I display this as a link in PHP?
PowerMac G5 dual 2.0ghz/128meg Radeon/500gb HD/2GB RAM, MorphOS 3.9 registered, user #1900
Powerbook G4 5,6 1.67ghz/2gb RAM, Radeon 9700/250gb hd, MorphOS 3.9 registered #3143
 

Offline TheMagicMTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2857
    • Show all replies
    • http://www.BartonekDragRacing.com
Re: PHP question..
« Reply #1 on: July 12, 2005, 05:02:24 AM »
doh!  I knew it had to be simple.. I was trying to embed html into PHP and tha wouldnt work.. but php in html... (and I'm already doing that in the submit button..geez.. its getting late)  ... Thanks!!
PowerMac G5 dual 2.0ghz/128meg Radeon/500gb HD/2GB RAM, MorphOS 3.9 registered, user #1900
Powerbook G4 5,6 1.67ghz/2gb RAM, Radeon 9700/250gb hd, MorphOS 3.9 registered #3143
 

Offline TheMagicMTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2857
    • Show all replies
    • http://www.BartonekDragRacing.com
Re: PHP question..
« Reply #2 on: July 12, 2005, 03:42:24 PM »
Quote
print(" .... ");


ok, that worked..

now to format my output.. LOL... thanks for the help..
PowerMac G5 dual 2.0ghz/128meg Radeon/500gb HD/2GB RAM, MorphOS 3.9 registered, user #1900
Powerbook G4 5,6 1.67ghz/2gb RAM, Radeon 9700/250gb hd, MorphOS 3.9 registered #3143
 

Offline TheMagicMTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2857
    • Show all replies
    • http://www.BartonekDragRacing.com
Re: PHP question..
« Reply #3 on: July 12, 2005, 04:32:27 PM »
yea I did that but its not formatting it like I want.. lets say for example I have a list of magazines by year, month, publisher etc.. well the months are not the same length. so I want to allocate the same amount of space for each month that way it aligns.. I know i can do str_len and figure it out and pad it but I was wondering if there was a simpler way with HTML to format output.. if no I'll do it the longer way in PHP.
PowerMac G5 dual 2.0ghz/128meg Radeon/500gb HD/2GB RAM, MorphOS 3.9 registered, user #1900
Powerbook G4 5,6 1.67ghz/2gb RAM, Radeon 9700/250gb hd, MorphOS 3.9 registered #3143
 

Offline TheMagicMTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2857
    • Show all replies
    • http://www.BartonekDragRacing.com
Re: PHP question..
« Reply #4 on: July 12, 2005, 04:47:02 PM »
thats what I was doing and it wasnt working..

just found the bug.. I was building a new table for each record read in..instead of defining it before my loop..
PowerMac G5 dual 2.0ghz/128meg Radeon/500gb HD/2GB RAM, MorphOS 3.9 registered, user #1900
Powerbook G4 5,6 1.67ghz/2gb RAM, Radeon 9700/250gb hd, MorphOS 3.9 registered #3143
 

Offline TheMagicMTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2857
    • Show all replies
    • http://www.BartonekDragRacing.com
Re: PHP question..
« Reply #5 on: July 12, 2005, 06:48:22 PM »
good suggestion!  that will probably fix the bug I cannot seem to find.
PowerMac G5 dual 2.0ghz/128meg Radeon/500gb HD/2GB RAM, MorphOS 3.9 registered, user #1900
Powerbook G4 5,6 1.67ghz/2gb RAM, Radeon 9700/250gb hd, MorphOS 3.9 registered #3143