Reply to Re: php / mysql statement not working for URL

Your name:

Reply:


Posted by Ron on 02/25/07 16:53

On Sun, 25 Feb 2007 12:17:18 +0100, "J.O. Aho" <user@example.net>
wrote:

>Ron wrote:
>> I figured it out:
>>
>> o "<td class = \"aptbody\" width = 15%>";
>> echo "<a href= ".stripslashes($row["location_url2"]).">Click
>> here</a>";
>> echo "</td>";
>>
>> forgot a couple of those pesky dots. :)
>>
>> Is there a better way of doing this?
>
>"Click here" is quite non informing and proper html wants options to be
>quoted (even if single quotes are accepted by standard, there are
>browsers that has problem with it and it's better to double quote)
>
>echo "<a
>href=\"".stripslashes($row["location_url2"])."\".>".stripslashes($row["location_url1"])."</a>\n";
>
>I do think adding the new line at the end of each line html that is
>echoed is a really good thing to do, as you this way will easier see
>things when you look at the html-source in the browser.
>
>I'm not sure if you need stripslashes(), as those character that may
>need that aren't allowed in an url, then you could use
>
>echo <<<EOL
> <td class="aptbody">
> <a href="{$row['location_url2']}">{$row['location_url1']}</a>
> </td>
>EOL;
>
>There ain't any point in using the width attribute in the td-tag, as you
>are already using CSS and you can set the width in the CSS.
Good morning,

Thanks for the response.

I agree, the "click here" was poor. It was late. Actually this will
turn into a variable based on the URL As I can't just name the column
and be done. Like if I linked to mapquest and Yahoo but then for a
particular record used a map from National Geographic. Whatever. and
with permission of course.

Your concatenation above might work but my output is a 5 column table
so the td statements should be separate, IMO.

I tried to add the newline to the end but could never make it work.
<shrug> Good idea and will work on it more.

The use of a table in this case I think is appropriate as it is
tabular and just a habit to put percents. Better than pixels. :) But
for kicks would you define the css element like td.col1, td.col2,
td.col3, abd so on??? I ws looking as CSS.org and was getting lost.

Thanks!

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация