Membership is FREE, giving all registered users unlimited access to every Acorn Domains feature, resource, and tool! Optional membership upgrades unlock exclusive benefits like profile signatures with links, banner placements, appearances in the weekly newsletter, and much more - customized to your membership level!

Dynamic pages php

Status
Not open for further replies.
Cheers everyone for there help, I think we are there now with all your help, what is it called when you change the url to say the hotel name instead of it being say desc.php?id=ba ba

so its something like desc.php/hotel-name?

Thnaks again everyone

If this site ever sells I reckon you should be donating 50% of the profits to admin seeing as most of the site has been built by forum members!

mod rewrite / url rewrite

http://www.yourhtmlsource.com/sitemanagement/urlrewriting.html

As has been suggested, pleeeease buy some php books or read some tutorials online.

Grant
 
But your not just helping me out your helping out everyone else who reads this, and this is only a tiny function in the whole site on one page, so hardly most of the site, I am a html/css writer php is new to me and I thank you all for your help,
its was only one line of code that was cocking everything up other than that I had most of it down,
But thank you anyway,
Im will to help anyone out I can if I can

Ryan
 
mod_rewrite is what your are looking for but think you should look at that bit a little later.

Try creating small 'deliverables' and you will soon work your way through to building your own site.

I would highly recommend you picking up a PHP book though as it will walk you through these common issues you face.

Other than that, your next bible should be http://www.php.net/
 
As I said when I fixed your desc.php script, you'd be much better off reading about correctly optimised database structure. If you had a few thousand rows in your database your site would struggle as you are searching for a numerical id which is stored as a varchar when it should be stored as an integer. This column should also be set to auto increment so that all id's are unique, as at the minute you could have more than one column with the same id.

Hope this helps.

Craig
 
Craig, So help me codd!

If ever there was someone other than Jedward who need a cattle bolt gun thingy to head its Mr Codd, I actually hear it in the voice of Quasimodo doing the bells, the bells.

mod_rewrite is going to open you up to regex, I know many very good php coders who struggle with regex.

Already your into normalisation and regex which are fairly advanced sql and php, you're going to struggle alot hunting errors and making changes and updates, this is like going from crawling to sprinting.
 
As a database guy, I would strongly advise that the database is correctly indexed and you avoid things like SELECT * and you have well thought out WHERE clauses to use indexes and just return what you are going to use.

If not, you are likely to cause a big strain on the database (especially when you get a fast multiple access such as a search engine bot). Failure to optimise may cause major performance issues which get your hosting account closed down if you don't have an understanding host :(

A little time spent on optimisation reaps big rewards, I have a client who thought he was looking at needing a dedicated server, after a few hours work he's now continuing to run on a shared account and > 10 fold faster than the original site.
 
As I said when I fixed your desc.php script, you'd be much better off reading about correctly optimised database structure. If you had a few thousand rows in your database your site would struggle as you are searching for a numerical id which is stored as a varchar when it should be stored as an integer. This column should also be set to auto increment so that all id's are unique, as at the minute you could have more than one column with the same id.

Hope this helps.

Craig

Yea I did change that straight away, I need to get some time to sort out the data base again as I was only doing stuff for testing and I know it works I can get on with it
 
Coders folly my son, you build something to test it an before you know it, you've invested too much time to want to scrap it.

If you intend to scrap it, STICK TO IT!, I can't tell you how much hassle you will save yourself :)

I was only doing stuff for testing and I know it works I can get on with it
 
Status
Not open for further replies.

The Rule #1

Do not insult any other member. Be polite and do business. Thank you!

Members online

Premium Members

New Threads

Our Mods' Businesses

*the exceptional businesses of our esteemed moderators
General chit-chat
Help Users
  • No one is chatting at the moment.
      There are no messages in the current room.
      Top Bottom