![]() Topic awaiting preservation: links in PHP |
|
---|---|
Author | Thread |
Bipolar (III) Inmate From: New York City |
![]() Alrighty. A few months ago I (with the assistance of you kind folks and the people at devshed) developed this PHP/MySQL database for my client where people can search dealers that sell his product. My client is inquiring about how to make the email, webpage, and mapquest map links people can click on. How can I do this? Just point me in the right direction and I will make my best effort: |
Bipolar (III) Inmate From: Berlin (almost) |
![]() It's not all that difficult. All you'll have to do is inserting <a> tags around the data you already have. |
Bipolar (III) Inmate From: New York City |
![]() hey! Yup. I caught that "mailto:" as well. Thanks so much |
Bipolar (III) Inmate From: Berlin (almost) |
![]() That's because the URLs you have there don't start with "http://" - if you're sure that it's the same with all other links in the db you could just let PHP add it. |
Bipolar (III) Inmate From: New York City |
![]() quote:
|
Paranoid (IV) Inmate From: Milwaukee |
![]() Putting \r characters in your code will put carriage-returns in the site source, not the browser output; for best results, use "<br />\r\n" if you're on a Windows server, or "<br />\n" if you're on Unix/Linux. My advice is to use just "\n" exclusively; since the web is pretty much built on Unix, that'll give you accurate results across the board. ("\n" is UNIX-style, "\r\n" is Windows style, and just "\r" is Mac style.) |
Bipolar (III) Inmate From: New York City |
![]() Thanks PF- I will follow your suggestion. |
Bipolar (III) Inmate From: Berlin (almost) |
![]() You'll have to realise what exactly the single quotes and dots do in that line... |
Bipolar (III) Inmate From: New York City |
![]() Thanks for explaining Kuckus. I still am having problems with this portion of code. I took out the quotes surrounding the "Link to Map" words like you instructed but was unclear about missing double-quotes around URL in href: |
Paranoid (IV) Inmate From: New Jersey, USA |
![]() CR08 |
Bipolar (III) Inmate From: New York City |
![]() Thank you both for taking the time to explain. I think I now beginning to understand. Single quotes surround html strings, double quotes are used only when applying to html (ie <a href=" "> </a> ), and PHP variables are separated from the main string by a dot. |
Bipolar (III) Inmate From: Berlin (almost) |
![]() CRO8: Yup, that's looking good |
Paranoid (IV) Mad Scientist with Finglongers From: Germany |
![]() in that case you'll have to check first, if it's a null field, and only print the link when there is data in it. |
Bipolar (III) Inmate From: New York City |
![]() Thanks! I am going to hold off for now checking for empty field as all fields will have map links- I will repost if necessary. |