Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 09-01-2008, 06:39 AM Hide Statment
Super Talker

Posts: 128
Name: Jose daSilva
Trades: 0
Hi there

I have the following statment that disables update data but it shows the contents:

<? if($consultant!=$session_name and $id){ echo" disabled"; } else { } ?>

Instead of disable what statment must I have to hide the page

Thanks
josil is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 09-01-2008, 07:45 AM Re: Hide Statment
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,385
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Don't output the page contents!
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 09-01-2008, 09:29 AM Re: Hide Statment
Super Talker

Posts: 128
Name: Jose daSilva
Trades: 0
Don't output the page contents!


And how can I do that?
josil is offline
Reply With Quote
View Public Profile
 
Old 09-01-2008, 09:36 AM Re: Hide Statment
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,385
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
you put it ALL in the else part of the statement.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 09-01-2008, 09:54 AM Re: Hide Statment
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,987
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
You can break from an else(), if(), while(), foreach() statement, etc, without having to echo everything, like this:
PHP Code:
<?php if($condition) { ?>
<!--a bunch of HTML goes here-->
<?php ?>
Now, if the condition is met, you can make the HTML chunk as large as you like, and it will be outputted. If not, nothing.
__________________
I build web things. I work for the startup
Please login or register to view this content. Registration is FREE
.

Last edited by wayfarer07; 09-01-2008 at 09:55 AM..
wayfarer07 is offline
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Old 09-01-2008, 11:17 AM Re: Hide Statment
Super Talker

Posts: 128
Name: Jose daSilva
Trades: 0
Quote:
Originally Posted by chrishirst View Post
you put it ALL in the else part of the statement.
Let me explain

I have a php file where I have the html and php, mysql codes, in order for the consultants to add data into data base. All consultants have diferent logins.
All consultants with a different logins can list all titules and the names of the consultants that have every product.
Bu only the consultant "owner" of his product can open the form to see or alter the contents 8descriptiosn, etc).
If any other try to open supose NOT TO OPEN in not to SEE the contents.
I only managed to make that he cannot change contens, bu it is not enouhg.
I hope that now I explain better the situation
Tanhks
josil is offline
Reply With Quote
View Public Profile
 
Old 09-01-2008, 11:32 AM Re: Hide Statment
Super Talker

Posts: 128
Name: Jose daSilva
Trades: 0
Quote:
Originally Posted by wayfarer07 View Post
You can break from an else(), if(), while(), foreach() statement, etc, without having to echo everything, like this:
PHP Code:
<?php if($condition) { ?>
<!--a bunch of HTML goes here-->
<?php ?>
Now, if the condition is met, you can make the HTML chunk as large as you like, and it will be outputted. If not, nothing.


I tried:

<php
if($consultant!=$session_nameand$id){ else{}?>

<
!--a bunch of HTML and php codes goes here-->


<? } ?>

DOES NOT WORK

josil is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Hide Statment
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.56980 seconds with 12 queries