Newbie PHP Problem - not sure what to call this post

This is a discussion on Newbie PHP Problem - not sure what to call this post within the PHP Language forums, part of the PHP Programming Forums category; Hello I was hoping you may be able to help me with a problem that I am having whilst customising ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-07-2004
Lloydie
 
Posts: n/a
Default Newbie PHP Problem - not sure what to call this post

Hello I was hoping you may be able to help me with a problem that I am
having whilst customising a Voting Script.

I have very basic knowledge of PHP, having only learnt it for a few months
whilst at university. I thought I would have a go at editing a pre written
script but am already coming up against hurdles.

http://www.tastymota.com/lloydie/pol...=mingavote.cfg
is the poll

http://www.tastymota.com/lloydie/pollvote/mingavote.cfg is the file it takes
its information from

The problem I am having is with line 34 of the php code (I think):

printf("<img src=\"%s\">",$imageurl["image"]);

This line only takes the first letter of the filename of the image that I
wish to display, which is less than handy. I figure I am on the right track
given that I have got it to display one letter!

(There is no image called fff.jpg but I will create one when I know the
script will call it properly!)

Many thanks in advance to anyone who can end my torture



Lloydie the Tired Newbie ( 02:02 in the morning )

PS Any suggestions for a title for this problem, and therefore a better
subject for this post are greatly appreciated!!


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.558 / Virus Database: 350 - Release Date: 02/01/2004


Reply With Quote
  #2 (permalink)  
Old 01-07-2004
Robert Downes
 
Posts: n/a
Default Re: Newbie PHP Problem - not sure what to call this post

Lloydie wrote:

> printf("<img src=\"%s\">",$imageurl["image"]);
>
> This line only takes the first letter of the filename of the image that I
> wish to display, which is less than handy. I figure I am on the right track
> given that I have got it to display one letter!


I don't use printf myself, but having checked the API, your syntax seems
correct for what you are trying to do.

What output do you get if you add this line before your trouble line:

echo "<p>TEST: array data == ".$imageurl["image"]."</p>";

If only one letter appears after the is-equal-to symbol, then the value
stored in your $imageurl array only has one character, and you should
suspect whatever code has built the array.
--
Bob
London, UK
echo Mail fefsensmrrjyaheeoceoq\! | tr "jefroq\!" "@obe.uk"
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 07:13 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0