Jump to content
Sign in to follow this  
rohan_har

PHP URL Question

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 :)

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...