Jump to content

PHP + SQL + links + .csv files


roadtripper

Recommended Posts

I have a .php webpage that pulls from a SQL database (based on the name of one of 300 different waterfalls). The SQL database is created by a .csv file that I upload.

 

I want to be able to put <a href=”links”> elements into the text of the .csv file so that I can essentially add links on all of these .php pages. However, it seems as though the .csv files do not accept quotation characters.

 

Is there a good way to do this? Perhaps using CSS with an ID or class that I somehow reference in the text of the .CSV file? Is that even possible with links?

 

Here is an example of a page:

http://www.newenglandwaterfalls.com/waterfall.php?name=Bickford%20Slides

 

I want to put links around the ‘New England Waterfalls: A Guide to More Than 400 Cascades And Waterfalls’ text. This text comes from the .CSV file.

Link to comment
Share on other sites

Seems like basic string manipulation. Please post your code to dynamically duplicate your page and we'll help if needed.

You'll need php variables.

Edited by niche
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...