Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

need some basic help

Featured Replies

Hi there,

 

Please visit the site

the site

 

look there are total 30+ pages

to make this site i did...

 

1. i use php include

2. 30 times i copy the page and include a html file on each php page

3.so if i click the a page it come with pagewith the included html and my link type is

 

www.mysite.com/dog.php or www.mysite.com/cat.php www.mysite.com/monkey.php ....

 

for these dog.php,cat.php and moneky.php i creat 3 html file like dog.html, monkey.html and cat.html

 

then i include it to the php pages using include php like..

 

in dog .php i include the file dog.html and i give a edit panel to the user to edit the dog.html file so the user/website owner can easily edit the .html file and update the page

 

 

But now i think that its a wrong way and i need help, beacuse i need a database driven site in which i dont have to make individul page and copy huge file or create manually all htm files.

 

Now i ma facing problem to undertanding the database driving site or page.

1. menu

in my previous technique user click the button dog and they gose to the link or other pagewwww.mysite.com/dog.php. but in database driven website there is a template system and the template remain static but only the content changes. but idont know how to do this

 

what will the dog button url. will i have to set it manually?

 

like wwww.mysitecom/pageid=1

 

my concept is not clear please help me

  • Author

suppose i want to make a site which have 25 page. then what i have to do?

 

i created a table named PAGE and set 25 field.

suppose my pages are... 'dog' 'cat' "snake'......... every page against everyfield. suppose for the "dog" page filed id=1 ,for the "cat" page field id is=2 for the snake page the field id=25.

 

am i correct?

 

then i have to display each field for each page?

or you could just leave them as page=dog, page=cat etc This maybe more SEO friendly (?) and you can also use a rewrite rule to make a 'friendly' url eg. mysite.com/dog etc

  • Author

thanks mate.

 

i have few several questions..

 

then i have to create 25 page like "dog: "snake" monkey" "cat".....

 

and then display the field id on it? then for 1000 page site i have to create manually 1000 page and then isert manually the field id 1000 times on the 1000 page. but nowadays in templating system they create only one page just content changes when user clic kthe button/pages/menu/navigation items

 

how to do this?

your database will have all you need.

An ID, a description and then the content associated with that ID. Your PHP page would then be created just once and use the database to retrieve and show the information.

 

maybe this will help? http://www.blazonry.com/scripting/linksdb/index.php Other tutorials exist :)

  • Author

yes i understand... and i checked your tutorial link. bythis tutorial i learn how to create add elelte and mange database. after learning it i can insertdata show data and manage data.

 

You said that after clicking on the button php automatically retrive data associated with the id ..suppose for the page "dog".. if user click the dog button the page retrive the dog story form the database dog id. when they click to the "snake" button the database will show the snake stroy on the same page. and here is my question how to make this system when user click a button automatic retrive data from that relvant db field?

 

what is the menu system??how to configure the menu that after clicking the menu the page content automatic change?

well each button would have the link assigned to it with an <a href... eg. mysite.com/template.php?id=dog

 

and then in template.php you'd use a statement like $param = $_GET['id']; $param would then contain 'dog'

 

you'd then use mysql to select records where database id is $param

 

Disclaimer (lol). Others may have hugely better ways especially where PHP is concerned and you could also use AJAX to load the content in dynamically.

  • Author

oh really usefull for me. is there any tutorial for this? i cansearch it on google? but i dont know the search term for it :p

Would it not be simpler to create the site using a cms?

  • Author

Would it not be simpler to create the site using a cms?

 

Yes. can you recomeded a cms ( except joomla drupal and wordpress).

 

is there any cms which template is easy to edit and in backend user can edit the predefined pages and update it?

Personally I'd recommend using SilverStripe, I use it all the time & find the templating system really easy to get your head around, it's free, full of features & pretty simple to use.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.