Jump to content

PHP URL Question


rohan_har
 Share

Recommended Posts

There are a number of similar topics regarding this question, but I didn't want to 'thread-jack' so I decided to make a new topic. Here is one such similar topic. Anway I wanted to access a database which I have already created using http://www.site.com/item.php?itemid=*number*.In this I want to be able to access hundreds of different items. Do I need to manually type out each one or is there some way to do it automatically?It would be helpful if anyone could answer this question, but if not I will probably work it out eventually :)

Link to comment
Share on other sites

So your going to place many of this itemids in your url? Could you give us a bit more information. Im thinking you could possibly do what you want with a for loop, or possibly a while loop. If you told us exactly what you wanted done Im sure we could figure something out for you.

Link to comment
Share on other sites

It is never the case that an URL gets such an amount of items, it is never a good way of passing data.Those variables placed in an URL are only meant to be a few, not more then ten or so.If you want hundred of variables passed to the next page, try to send the user alternatively to the next page, by submitting a form. In it you then can have hidden fields, that are similarly accessable to the variables in an URL, instead of $_GET then you use $_POST :)Not to mention specifying method="post" in the form element.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...