Forums

PHP

This topic is locked

if not equal to

Posted 13 Mar 2002 00:02:27
1
has voted
13 Mar 2002 00:02:27 Stephen Bateman posted:
Can someone help me out I am going mad trying to do some IF coding.

I have written the following code, in an attempt to hide a table if the page is called from a url.

<?php if ($HTTP_GET_VARS["inputtype"] != "url" {?>

Dispite calling the page with the URL of page.php?inputtype=url the table is displayed every time.

Any ideas ?

Thanks in advance, Stpehen

Replies

Replied 13 Mar 2002 15:37:12
13 Mar 2002 15:37:12 Bruno Mairlot replied:
Hi Stephen,

could you please, post the whole if() { ... } content. If your table HTML code is too big, just post the <table> ... </table>

That way, we can check how you did the IF.


Though, in the example you gave, it is normal that the code goes into the if statement if you call that page with a query strint like inputtype=url. If you don't want to show the table, then use the
if(<font color=red><b>!</b></font id=red>$HTTP_GET_VARS["inputtype"] != "url" {?&gt;

One question, though, do you want to hide that table if the request type is a GET and show it if the request type is a POST ?

Could you explain a little further what you really are trying to do, because maybe there is another way to do it ?

Bruno

--- Better to die trying, than never try at all ---

Reply to this topic