How do I change php suffixes to HTML

  • mankeymonkey
  • Born
  • Born
  • mankeymonkey
  • Posts: 4

Post 3+ Months Ago

im a n00b to all this PHP stuff and have been trying to find out how to do http://www.site.com/index.php?id=321 in the address bar and when the 321 part on the end is changed to something elts eg 320 it will come up with a different page. thx.
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • Scorpius
  • Proficient
  • Proficient
  • User avatar
  • Posts: 401
  • Loc: Scorpion Hole

Post 3+ Months Ago

Well, I don't really get what you are wanting to do. Can you give a better example please.
  • mankeymonkey
  • Born
  • Born
  • mankeymonkey
  • Posts: 4

Post 3+ Months Ago

im trying to find out how the index.php?id=321 creates a different page to index.php?id=300 and does it still need a different page creating for index.php?id=321, index.php?id=322, index.php?id=323 etc. Also on forums it has the posting.php?mode=editpost&p=60430 stuff and comes up with a new page :?. i dont realy know how to explain this much more because i dont realy know what it does.
  • Managedlinks
  • Proficient
  • Proficient
  • Managedlinks
  • Posts: 294

Post 3+ Months Ago

Hi

php is dynamic, that means each time someone loads the page index.php it "can" change.

the page is really a little program (script)

the suffix ?id=321 is a command you pass to the page

so the person who creates the index.php page can determine what is sent to the browser depending on the command it receives.

i.e. (sample only)

Code: [ Select ]
if (id equals 321)
  print 'hello John'
else if (id equals 322)
  print 'hello martha'
else
  print "Hello stranger I don't know you'
end if
  1. if (id equals 321)
  2.   print 'hello John'
  3. else if (id equals 322)
  4.   print 'hello martha'
  5. else
  6.   print "Hello stranger I don't know you'
  7. end if


of course id=321 could actually mean anything it is entirely up to the programmer
  • Scorpius
  • Proficient
  • Proficient
  • User avatar
  • Posts: 401
  • Loc: Scorpion Hole

Post 3+ Months Ago

Well, ManagedLinks said just about all of it in a brief overview, but most scripts you probably see and are talkinb about use MySQL also which is a type of database. And you can have multiple if statements inside if statements. You should check out some of the tutorials over at the Zend site: http://www.zend.com/zend/tut/
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

Actually, I think he's asking the same question that's being asked here:

[Dead Link]

Like the way Bigwebmaster set it up here. Truthfully, I can't remember how he told us he did it, so I'll ask him to take a look at these two posts and see if he'll let you guys know how he accomplished it.
  • Axe
  • Genius
  • Genius
  • User avatar
  • Posts: 5739
  • Loc: Sub-level 28

Post 3+ Months Ago

mod_rewrite :)
  • mankeymonkey
  • Born
  • Born
  • mankeymonkey
  • Posts: 4

Post 3+ Months Ago

thx for all your help especialy Managedlinks thats what i was trying to do....i think :? :thumbsup:. ill go start fiddleing
  • Daniel
  • Student
  • Student
  • Daniel
  • Posts: 91

Post 3+ Months Ago

i can hep e-mail me if you still need help
thx

Post Information

  • Total Posts in this topic: 9 posts
  • Users browsing this forum: No registered users and 70 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.