22 Hours Ago | Add to redhotspike's Reputation | Flag Bad Post
I have never used PHP before. I'm pretty hardcore with (x)HTML, JavaScript, CSS, and I also know C++.
Here's the thing - I need to create some sort of code that receives information from the back end of a site and dynamically adds a link on an overview page of that new article and also creates a new webpage with the article on it.
I'm not quite sure where to start or how to go about doing this. If anyone could give me a push in how to get started or maybe explain how the code would work?
**The link will reside on a page built with HTML**
Any help is greatly appreciated....
If necessary I'll use ASP (but I don't have any experience with that either )
Thanks!

Recommended Answers

All 2 Replies

Since you haven't had any responses, I'll take a crack at it to get the ideas going. I'm not providing any code, just some thoughts.

I'll assume that you have a specific page where the links will appear and that there could be any number of such links. I think that the starting point would be to collect the information and put it into a database. At some point, a program in the backend or a human on a keyboard needs to call/run the program that captures the data and put it into the database.

Your HTML page that displays the links will need to become a PHP page (even though much of the content will be the same HTML that you have now). It will have a PHP section that will open the database and a loop that will read the records and create links to overview pages (and echo them to the screen).

The overview pages will need to be created. I would suggest that you create a shell that you can save as a file (it could be .txt or .php). At the same time that you are adding the overview info to the database you can create the new overview page(s). Simplistically, you can read the shell for the page using file_get_contents, search for some specific string like "//####insert_your_content_here_####"
and replace it / insert your overview text from the input. You can then save the new string with file_put_contents to create a new php module under the appropriate name (which has to follow a standard format or the name has to be in the database so the link can be created to it).

That's how I would do it.

Wow! That you so much! That is exactly the kind of thing I was looking for! Thank youuuuuu!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.