<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1041462" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1041462</link>
    <description></description>
    <language>en</language>
          <item>
    <title>Hey guys I am Marcus.
Can</title>
    <link>https://www.webmaster-forums.net/webmasters-corner/developing-my-website-using-php-and-mysql#comment-1231870</link>
    <description> &lt;p&gt;Hey guys I am Marcus.&lt;br /&gt;
Can anyone help me edit my blog?&lt;br /&gt;
Actually I envy my coworker&#039;s blog design.&lt;br /&gt;
Will you help me?&lt;/p&gt;
 </description>
     <pubDate>Wed, 30 Jul 2008 09:38:51 +0000</pubDate>
 <dc:creator>makmakpoli</dc:creator>
 <guid isPermaLink="false">comment 1231870 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>One option is a registration</title>
    <link>https://www.webmaster-forums.net/webmasters-corner/developing-my-website-using-php-and-mysql#comment-1231555</link>
    <description> &lt;p&gt;One option is a registration and login script to assign people a specific username, and then you can use the usernames to determine what &#039;level&#039; they have.&lt;/p&gt;
&lt;p&gt;So superusers can edit images, text blah etc (whatever you want them to do) then administrators can do everything etc etc.&lt;br /&gt;
You can edit the DB to change the column in the table that hold the username type (superuser/admin etc) or make a control panel that can change the users authority type. That would also just change the field in the DB table that determined their authority type.&lt;br /&gt;
Then the script would do something like...&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #FF8000&quot;&gt;// do something in an include file in all pages to determine if logged in (check their cookie/session or whatever) &lt;br /&gt;// and if logged in get their authority type&lt;br /&gt;// $logged_in will = yes or no depending on their status&lt;br /&gt;// $user_auth will = one of the auths you have, admin, superuser or whatever&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;if (&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$logged_in &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;== &lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;no&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;)&lt;br /&gt;{&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;just show them the viewable contents &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;and &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;no links to editing stuff&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;}&lt;br /&gt;if (&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$logged_in &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;yes&quot; &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;&amp;amp;&amp;amp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$user_auth &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;== &lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;admin&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;)&lt;br /&gt;{&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;let them into the file delete option &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;and &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;other admin stuff&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;}&lt;br /&gt;if (&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$logged_in &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;yes&quot; &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;&amp;amp;&amp;amp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$user_auth &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;== &lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;super&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;)&lt;br /&gt;{&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;let them &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;do &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;what supers can &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;do}&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;That&#039;s just the basic idea. I cant put exact code as I don&#039;t know exactly what and where you allow things to certain users.&lt;/p&gt;
&lt;p&gt;Of course, be careful WHO you give access to file uploading. If you run all the required security checks then you should be fine, but allowing someone to edit files that are run on your server should have considerable thought towards it being a potential security risk (even with security checks).&lt;/p&gt;
 </description>
     <pubDate>Mon, 14 Jul 2008 15:50:00 +0000</pubDate>
 <dc:creator>greg</dc:creator>
 <guid isPermaLink="false">comment 1231555 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>Quote:
Also, is there a way</title>
    <link>https://www.webmaster-forums.net/webmasters-corner/developing-my-website-using-php-and-mysql#comment-1231537</link>
    <description> &lt;p&gt;&lt;div class=&quot;quote-msg&quot;&gt;&lt;div class=&quot;quote-author&quot;&gt;Quote:&lt;/div&gt;Also, is there a way to set up different levels of users to the site? Obviously, guests who can browse the site, and Administrators who can edit the main content, but could I add users who can upload and edit their own Profile for example?&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;You have two choices:&lt;/p&gt;
&lt;p&gt;#1&lt;/p&gt;
&lt;p&gt;Import the site into a community portal, I would recommend &lt;a href=&quot;http://drupal.org&quot;&gt;Drupal&lt;/a&gt; (in use here at TWF)&lt;/p&gt;
&lt;p&gt;Drupal has membership and profiles, customizable roles/permissions, and much more to offer &lt;/p&gt;
&lt;p&gt;Some Drupal modules that help with this:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://drupal.org/project/import_html&quot;&gt;Import HTML&lt;/a&gt; and &lt;a href=&quot;http://drupal.org/project/migrator&quot;&gt;Migrator&lt;/a&gt; some more &lt;a href=&quot;http://drupal.org/project/Modules/category/64&quot;&gt;import modules&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;#2&lt;/p&gt;
&lt;p&gt;Or set it up yourself on the existing site, try searching &lt;a href=&quot;http://hotscripts.com&quot;&gt;HotScripts&lt;/a&gt; or &lt;a href=&quot;http://sourceforge.net&quot;&gt;SourceForge&lt;/a&gt; for free script(s) to adapt&lt;/p&gt;
 </description>
     <pubDate>Sun, 13 Jul 2008 14:14:17 +0000</pubDate>
 <dc:creator>decibel.places</dc:creator>
 <guid isPermaLink="false">comment 1231537 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>The site URL is</title>
    <link>https://www.webmaster-forums.net/webmasters-corner/developing-my-website-using-php-and-mysql#comment-1231535</link>
    <description> &lt;p&gt;The site URL is &lt;a href=&quot;http://www.ponthirtaekwondo.co.uk/&quot; title=&quot;http://www.ponthirtaekwondo.co.uk/&quot;&gt;http://www.ponthirtaekwondo.co.uk/&lt;/a&gt;. I&#039;ve since cleaned up the HTML and CSS a bit whilst I&#039;ve been looking into the PHP side of things, so I&#039;m not bothered about that.&lt;/p&gt;
&lt;p&gt;The majority of the information is going to be text, although there are quite a few images as well, especially on the Profiles pages, and I think it would be a nice touch to allow these to be changed as well.&lt;/p&gt;
&lt;p&gt;Also, is there a way to set up different levels of users to the site? Obviously, guests who can browse the site, and Administrators who can edit the main content, but could I add users who can upload and edit their own Profile for example?&lt;/p&gt;
 </description>
     <pubDate>Sun, 13 Jul 2008 10:22:18 +0000</pubDate>
 <dc:creator>oliverdavies</dc:creator>
 <guid isPermaLink="false">comment 1231535 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>Yeah, it&#039;s not the way I</title>
    <link>https://www.webmaster-forums.net/webmasters-corner/developing-my-website-using-php-and-mysql#comment-1231508</link>
    <description> &lt;p&gt;Yeah, it&#039;s not the way I would do it, it was just an example of what oliverdavies might find in index.php (as I didn&#039;t know what the code is)&lt;/p&gt;
 </description>
     <pubDate>Fri, 11 Jul 2008 19:14:14 +0000</pubDate>
 <dc:creator>greg</dc:creator>
 <guid isPermaLink="false">comment 1231508 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>greg wrote:
The URL page</title>
    <link>https://www.webmaster-forums.net/webmasters-corner/developing-my-website-using-php-and-mysql#comment-1231502</link>
    <description> &lt;p&gt;&lt;div class=&quot;quote-msg&quot;&gt;&lt;div class=&quot;quote-author&quot;&gt;&lt;em&gt;greg&lt;/em&gt; wrote:&lt;/div&gt;The URL page value (page=1) must represent data somewhere, within in the index.php file will be something like&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;if (&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$_GET&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;page&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;] == &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;)&lt;br /&gt;{do &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;stuff &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;for &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;id 1&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;}&lt;br /&gt;elseif (&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$_GET&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;page&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;] == &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;)&lt;br /&gt;{do &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;stuff &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;for &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;}&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
This would be the basic setup, but instead of using quite a long list of elseifs, I would suggest you just handle it with a switch() like this:&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;switch (&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$_GET&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;page&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;]) {&lt;br /&gt;&amp;nbsp; case &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {do &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;stuff &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;for &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;id 1&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;br /&gt;&amp;nbsp; case &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {do &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;stuff &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;for &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;id 2&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;br /&gt;&amp;nbsp; case ...:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {do &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;stuff &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;for &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;id &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;...}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;br /&gt;&amp;nbsp; default:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #FF8000&quot;&gt;//An unspecified page has been chosen; send to an error page&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;header&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;location: error404.php&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
 </description>
     <pubDate>Fri, 11 Jul 2008 12:16:05 +0000</pubDate>
 <dc:creator>mscreashuns</dc:creator>
 <guid isPermaLink="false">comment 1231502 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>The URL page value (page=1)</title>
    <link>https://www.webmaster-forums.net/webmasters-corner/developing-my-website-using-php-and-mysql#comment-1231501</link>
    <description> &lt;p&gt;The URL page value (page=1) must represent data somewhere, within in the index.php file will be something like&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;if (&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$_GET&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;page&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;] == &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;)&lt;br /&gt;{do &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;stuff &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;for &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;id 1&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;}&lt;br /&gt;elseif (&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$_GET&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;page&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;] == &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;)&lt;br /&gt;{do &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;stuff &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;for &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;}&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;The &quot;do stuff&quot; will either be the data in that file itself, i.e. echo out the content of the page for that id, or an include file which has each page data stored for the relevant id or the data will be retrieved from a database.&lt;/p&gt;
&lt;p&gt;So you want to be taking each &quot;do stuff&quot; for each id and putting them into separate pages.&lt;br /&gt;
As you are putting it into separate pages and removing the URL get data (page=), you should consider this as almost starting from scratch, as apposed to you just re-arranging a few bits.&lt;/p&gt;
&lt;p&gt;Editing content from within a file can be a tricky task, especially as you are just learning PHP. A HTML, and PHP, file with web page contents in it is arranged in a certain way, with line breaks, paragraphs, divs, arrangement on the page from CSS and so on.&lt;br /&gt;
So simply taking all that and allowing editing of it within an online editor will mean you also need to know where to put the divs, line breaks and other CSS etc.&lt;br /&gt;
So then if you load all the HTML tags and CSS references that are in the HTML, as well as the text, into an online editor to edit the contents, then you might as well just stick to editing it in your editor you use to make the file in the first place. &lt;/p&gt;
&lt;p&gt;There isn&#039;t any real advanage if you have to do that.&lt;br /&gt;
Usually, editing website page content within an onsite editor is just a block of text somewhere, or perhaps an image. Such as to change &quot;Image of the month&quot;, or insert the &quot;Latest news report&quot; etc.&lt;br /&gt;
And this is usually done by a programmer for the site owner, the site owner not wanting to open a file in a editor and start playing with the code even just to edit text.&lt;/p&gt;
&lt;p&gt;But I can&#039;t really advise on the best approach for you unless you describe what data exactly you want to edit on site, and if you can give us a link to it.&lt;br /&gt;
Is it just text you will want to edit? Or do you want to edit links/images/buttons/navigation etc?&lt;/p&gt;
 </description>
     <pubDate>Fri, 11 Jul 2008 11:06:00 +0000</pubDate>
 <dc:creator>greg</dc:creator>
 <guid isPermaLink="false">comment 1231501 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>I would prefer to use</title>
    <link>https://www.webmaster-forums.net/webmasters-corner/developing-my-website-using-php-and-mysql#comment-1231490</link>
    <description> &lt;p&gt;I would prefer to use seperate pages - index.php, about_us.php, profiles.php etc., but I&#039;m just trying to work out how I&#039;d manage to code it all so that I can do an edit_page.php file and edit the content online.&lt;/p&gt;
&lt;p&gt;I&#039;ve got a fair understanding of HTML and CSS, and I&#039;ve just worked though a PHP/MySQL training DVD, but as I mentioned above, it only has one index.php file and the value changes depending on which page is being loaded, but I don&#039;t think that this would give me the level of functionality that I need.&lt;/p&gt;
 </description>
     <pubDate>Thu, 10 Jul 2008 09:02:19 +0000</pubDate>
 <dc:creator>oliverdavies</dc:creator>
 <guid isPermaLink="false">comment 1231490 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>pr0gr4mm3r has covered the</title>
    <link>https://www.webmaster-forums.net/webmasters-corner/developing-my-website-using-php-and-mysql#comment-1231477</link>
    <description> &lt;p&gt;pr0gr4mm3r has covered the MYSQL option and how you would go about it.&lt;/p&gt;
&lt;p&gt;But it&#039;s very difficult to give a true solution as we don&#039;t know exactly what data you want to edit in those files, or how you need to do it.&lt;br /&gt;
You would usually just open the file you want to change the data in and change it manually, as you do when you create it.&lt;br /&gt;
The usual reason you would use an onsite script to edit page contents is if someone wanted to change content who cant or doesn&#039;t know how to edit code files themselves.&lt;/p&gt;
&lt;p&gt;I wouldn&#039;t recommend running your entire site on one PHP file (the index.php) with simply an id for what content to serve within it or even from include files or the DB.&lt;/p&gt;
&lt;p&gt;It&#039;s perfectly fine to have an index.php, about_us.php, contact_us.php and so on.&lt;/p&gt;
&lt;p&gt;The GET info that gets the information from your url (address bar) and allows you to use that info is going to be a tough one to be able to edit if it&#039;s all in one file (index.php)&lt;br /&gt;
Which is why having different pages would be better (IMO)&lt;/p&gt;
&lt;p&gt;So do you have something like an &quot;Edit this page&quot; link on pages?&lt;br /&gt;
If yes then you could use something like the following:&lt;br /&gt;
(it isnt true PHP, it&#039;s just to give you the idea)&lt;/p&gt;
&lt;p&gt;on homepage.php/index.php&lt;br /&gt;
&lt;code&gt;&amp;lt;a href=&amp;quot;edit_page.php?page=1&amp;quot;&amp;gt;Edit this page&amp;lt;/a&amp;gt;&lt;/code&gt;&lt;br /&gt;
on about_us.php&lt;br /&gt;
&lt;code&gt;&amp;lt;a href=&amp;quot;edit_page.php?page=2&amp;quot;&amp;gt;Edit this page&amp;lt;/a&amp;gt;&lt;/code&gt;&lt;br /&gt;
on contact_us.php&lt;br /&gt;
&lt;code&gt;&amp;lt;a href=&amp;quot;edit_page.php?page=3&amp;quot;&amp;gt;Edit this page&amp;lt;/a&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;index.php?page=&lt;br /&gt;
$get = $_GET[&#039;page&#039;]&lt;br /&gt;
if $get = 1 (include homepage.php)&lt;br /&gt;
else if $get = 2 (include about_us.php)&lt;br /&gt;
else if $get = 3 (include contact_us.php)&lt;/p&gt;
&lt;p&gt;etc&lt;/p&gt;
&lt;p&gt;Then the edit page could also use the same method&lt;/p&gt;
&lt;p&gt;edit_page.php?page=&lt;br /&gt;
$get= $_GET[&#039;page&#039;]&lt;br /&gt;
if $get = 1 (open homepage.php for editing)&lt;br /&gt;
else if $get = 2 (open include about_us.php for editing)&lt;br /&gt;
else if $get = 3 (open include contact_us.php for editing)&lt;/p&gt;
&lt;p&gt;But I would prefer to use seperate pages altogether.&lt;/p&gt;
&lt;p&gt;homepage.php/index.php&lt;br /&gt;
about_us.php&lt;br /&gt;
contact_us.php&lt;/p&gt;
&lt;p&gt;You could even use those pages and then have the textual content in an include file...&lt;br /&gt;
/includes/homepage.php&lt;br /&gt;
/includes/about_us.php&lt;br /&gt;
/includes/contact_us.php&lt;/p&gt;
&lt;p&gt;Then in about_us.php just &lt;code&gt;include /includes/about_us.php&lt;/code&gt; where you want the content to be.&lt;/p&gt;
&lt;p&gt;So your edit_page.php can still use the edit links and GET info as above, but the pages being served would be their own names.&lt;/p&gt;
&lt;p&gt;There are various ways to do this, but it depends on the info you are wanting to edit.&lt;br /&gt;
As for serving the content, I do strongly recommend sticking to using different file names for the different things.&lt;br /&gt;
This is better for search engines, better for visitors to know where they are and to bookmark etc and MUCH easier to code.&lt;/p&gt;
 </description>
     <pubDate>Wed, 09 Jul 2008 17:03:48 +0000</pubDate>
 <dc:creator>greg</dc:creator>
 <guid isPermaLink="false">comment 1231477 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>I am working on a site that</title>
    <link>https://www.webmaster-forums.net/webmasters-corner/developing-my-website-using-php-and-mysql#comment-1231470</link>
    <description> &lt;p&gt;I am working on a site that appears to be based on Mambo and/or Joomla but has long since forked into a custom situation.&lt;/p&gt;
&lt;p&gt;It uses an index.php to require various PHP &amp;amp; JavaScript files with libraries including functions for email, connection to the db etc and a config.php page with a bunch of variables including MySQL connection info &lt;/p&gt;
&lt;p&gt;It uses an &quot;option&quot; parameter to include a separate PHP file that is used to include a PHP template file with the HTML code for the structure of the page, for example:&lt;/p&gt;
&lt;p&gt;index.php?option=search&amp;amp;sort=newest&lt;/p&gt;
&lt;p&gt;would include the search.php file that includes the templates/search.php file and then performs a database operation on the members returning the newest members (the code for the db operations are in the search.php file, not the template file)&lt;/p&gt;
&lt;p&gt;but other pages are static eg&lt;/p&gt;
&lt;p&gt;index.php?option=tshirt_contests&lt;/p&gt;
&lt;p&gt;includes the tshirt_contests.php file that includes the templates/tshirt_contests.php file&lt;/p&gt;
&lt;p&gt;I have seen this sort of structure where the templates are named as tpl eg tshirt_contests.tpl.php (yeah, you see this in Drupal too)&lt;/p&gt;
&lt;p&gt;I find it a little tedious to add two files for every new page, a top PHP file that just contains an include statement for the template file.&lt;/p&gt;
&lt;p&gt;However, sometimes the top PHP file also performs some operations.&lt;/p&gt;
&lt;p&gt;It all depends on your structure and what you do with the parameters in the URL...&lt;/p&gt;
 </description>
     <pubDate>Wed, 09 Jul 2008 14:39:32 +0000</pubDate>
 <dc:creator>decibel.places</dc:creator>
 <guid isPermaLink="false">comment 1231470 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
