Variable Passing Problem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Ic3MaN
Forum Newbie
Posts: 2
Joined: Mon May 26, 2003 8:03 am

Variable Passing Problem

Post by Ic3MaN »

I am trying to pass a variable between 2 pages. I am using a Select Drop Down Box inside a form. Now, once i hit the submit button, it goes to the next page, displays in the address bar the address of the page i want to go to plus the variable i want to pass. My problem is, i cannot display the variabe on the new page. I want to use it in an $sql=SELECT Type FROM Database WHERE condition LIKE variable.

Any Suggestions

Thanks
[]InTeR[]
Forum Regular
Posts: 416
Joined: Thu Apr 24, 2003 6:51 am
Location: The Netherlands

Post by []InTeR[] »

If the vars allready a given in the url to the 1st page, you can use a POST method in your form.

If not, you can echo these values in a type hidden input element.
Ic3MaN
Forum Newbie
Posts: 2
Joined: Mon May 26, 2003 8:03 am

Post by Ic3MaN »

after i hit the submit button on my page, the url is like this:
infoselect.php?item=Engine

now engines is from the drop down list.

i have done this before, and it worked fine. Could it be that i am running on Localhost??? I dont think that it would make a diference

also, could you explain "If not, you can echo these values in a type hidden input element."
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

Post Reply