Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I want something like Wordpress's system. I want to get header code from header.php so I will not have to edit all of the pages when I'm going to edit something.
You can never get the code because one the php page is render, it gets converted into HTML so you will always see html.
I understand, you need header component.
1)Create a file header.php (add navigation bar or logo or whatever you want).
2)Include it in other php files as include("header.php");
so all the pages will be using this one header.php file and you can modify it and the changes would get reflected all over the web app.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I would like to extract prices from Klipsch.com but the prices don't immediately load upon loading the site, they load after the website is fully loaded using JavaScript or some other script. For example, I'm trying to extract the price from the inside of this page from the inside of this element:
<span class="product-display-price ecommerce-element">$3,284.00</span>
I've tried using Simple HTML DOM Parser but there is no delay function. I would like to achieve this in PHP but languages like Ajax would work fine too.
The site loads item details from an external javascript file. Why don't you call that file instead?
http://product.shopatron.com/product/{product_id}.jsonp?apikey={your_api_key}&...
For example, http://www.klipsch.com/products/la-scala-ii-floorstanding-speaker calls:
http://product.shopatron.com/product/1000996.jsonp?api_key=5gsk5uyr&apiVer=2.4.4&jstVer=2.4.4&method=get&headers%5BAccept%5D=*%2F*&callback=jQuery17202970524297561483_1481065390010&_=1481065390234
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I made an HMTL menu and I want to add it to the page using PHP(I have some HTML and some PHP files).
If I use:
include('menu.html');
there is always something that isn't right.
So, how can I add the HTML menu using PHP? The menu must be on top, and the same as it is in HTML.
Have a look at this question: Question about including html page in PHP
If you have problems with the .css because they are included with relative path you need to set the relative path "relative" to the .php file
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I want my client to be able to log into their website, fill out a form and then have that webpage permanently have whatever they put into that form. Is there a way to use php to take whatever is submitted in that form and replace the html content with it? Im new to php, which functions could I use? And is it possible for php to permanently change anything on a site? Im not terribly concerned with security
Start with wordpress and if you don't like it, then there are other content management systems out there. Google can help you find one too.
Wordpress site
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am making a website using HTML. I am not familiar with PHP. I need the navigation and header part to be in a single place. i.e., Once I change the menus in one place it should reflect in all other pages. Kindly help me on this.
Thanks in Advance.
You could use include or require to add your Menu-Html file in every page you wish.
you could add something like this:
<?php
include('menu.html');
?>
wherever your menu should appear in your HTML, having a menu.html file of course.
and you'll need an apache server or any other that can 'read' your php files.
include php documentations
require php documentations
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I want the admin can change the contents of the html page after successful login.
How can I show the contents of html page in an editable format fetching all the contents from the html page.
So that admin can modify contents and then save it to change the front end.
Thanks for your time.
The easiest thing to do is to set up an CMS upfront.
Anyway, you can try out this link http://www.techsling.com/2011/12/10-ways-to-convert-a-simple-htmlcss-website-into-a-content-management-system/. I personally have some experience with Surreal, but I would not recommend it.
If you really think of content management, you should go with a CMS (one of the big 3: Wordpress, Joomla, Drupal).
Hope that helps