link problem
link problem
От:
arun kv <arun@library.iisc.ernet.in>
Дата:
hello sir,
i have printed the contents of a database on a table using php. how
to give link from each content of cell to another page or file(like
pdf). table in php is been created using printf() statement and i am
unable to insert code to give link for whatever i print.
thanx in advance
Arun
Re: link problem
От:
arun kv <arun@library.iisc.ernet.in>
Дата:
On Thu, 28 Feb 2002, arun kv wrote: > > > hello sir, > i have printed the contents of a database on a table using php. how > to give link from each content of cell to another page or file(like > pdf). table in php is been created using printf() statement and i am > unable to insert code to give link for whatever i print. > thanx in advance > Arun > >
Re: link problem
От:
pgsql@digitalmindgames.com
Дата:
At 07:02 28/02/02, Arun wrote: >hello sir, > i have printed the contents of a database on a table using php. how >to give link from each content of cell to another page or file(like >pdf). table in php is been created using printf() statement and i am >unable to insert code to give link for whatever i print. > thanx in advance > Arun How are you fetching the data from your query? If you use pg_fetch_array(), or one of the related functions, you can pick out the individual data elements from the array and put whatever formatting you like around them. best, Mo ===== "How can you expect a little child whose mother is an angel and whose father is a Cannibal King and who has spent her life sailing the seas to tell the truth always?" Astrid Lindgren (1907-2002)
Re: link problem
От:
Zak Greant <zak@mysql.com>
Дата:
On Thu, 2002-02-28 at 00:02, arun kv wrote:
>
>
> hello sir,
> i have printed the contents of a database on a table using php. how
> to give link from each content of cell to another page or file(like
> pdf). table in php is been created using printf() statement and i am
> unable to insert code to give link for whatever i print.
> thanx in advance
> Arun
Hi Arun,
You should review the printf and sprintf documentation. It is a bit
daunting at first, but makes sense after a bit of work.
To answser your question as best I can without seeing source code,
here is one way to make a link using a printf statement
$link = "http://www.php.net/";
$text = "PHP Website";
printf ('%s', $link, $text);
Notice that the first %s is replaced with the value of $link,
while the second %s is replaced with the value of $text.
It looks like you are just getting started with PHP - you can
find a lot of helpful resources at http://www.php.net/support.php
Good Luck and happy PHPing!
--
Zak Greant
MySQL Advocate
PHP Quality Assurance Team