943,635 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 551
  • PHP RSS
May 23rd, 2009
0

.php url problem

Expand Post »
Hi,

I'm very new to php and i'm really struggling to work the following out.

I have a link in one of my php pages
storeitems.php?cat=Foods&store=Yes
that uses a recordset in the target page to display a list according to the above variables.

How can I make my 1st variable (cat) = 'any'?
Whilst I need this link, I need to create a new link to filter everything with a Yes (whether or not Food is present in the record)

Hope i've made some sense

Any guidance appreciated. Thanks, Paul
Similar Threads
Reputation Points: 10
Solved Threads: 1
Newbie Poster
cs4monkey is offline Offline
2 posts
since May 2009
May 23rd, 2009
0

Re: .php url problem

Click to Expand / Collapse  Quote originally posted by cs4monkey ...
Hi,

I'm very new to php and i'm really struggling to work the following out.

I have a link in one of my php pages
storeitems.php?cat=Foods&store=Yes
that uses a recordset in the target page to display a list according to the above variables.

How can I make my 1st variable (cat) = 'any'?
Whilst I need this link, I need to create a new link to filter everything with a Yes (whether or not Food is present in the record)

Hope i've made some sense

Any guidance appreciated. Thanks, Paul
From what i understood,


While retrieving it using the GET in storeitems.php page use,
PHP Syntax (Toggle Plain Text)
  1. if(( $_GET["cat"]== "Food") || ($_GET["store"] == "Yes"))
  2. {
  3. :
  4. :
  5. :
  6. }
Hope this helps
Last edited by csharplearner; May 23rd, 2009 at 11:47 pm.
Reputation Points: 11
Solved Threads: 3
Junior Poster in Training
csharplearner is offline Offline
99 posts
since Nov 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: Global Methods
Next Thread in PHP Forum Timeline: How to split text into pages?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC