Kahuki Webmaster Forum and Discussion Community  

Go Back   Kahuki Webmaster Forum and Discussion Community > Website Development & Management > Webdesign & HMTL

Webdesign & HMTL Here you can post all your questions regarding Webdesign, HTML, CSS or DHMTL.



Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-27-2007, 03:54 AM
Rookie
 
Join Date: Jun 2007
Posts: 15
ewriter is on a distinguished road
Help regarding hidden texts

Hello All

Is it possable for me to have some text on a page that is hidden unless you have logged in for example i have a web page that displays caravans for exchange with all the details for each van but i want to keep contact details hidden unless they have registered if you see what i mean to save having 2 pages 1 with all detals and 1 with restricted details ?

Reply With Quote
  #2 (permalink)  
Old 08-19-2007, 07:11 AM
Rookie
 
Join Date: Sep 2007
Posts: 8
Lovebug is on a distinguished road
If I understand you correctly, you could achieve this effect in two ways: one is via CSS/JavaScript and the other is via PHP.

In CSS, you could employ the visibility:hidden/visible together with a conditional JavaScript statement. In PHP, you could just use "IF" and "include". I do not intend to go into details of how it should be done. But I just wish to tell you that it is possible. Google it up, I'm sure you'll find what you need.

Good luck!

Reply With Quote
  #3 (permalink)  
Old 10-30-2007, 11:27 AM
donna's Avatar
Member
 
Join Date: Oct 2007
Location: New Zealand
Posts: 202
donna is on a distinguished road
If you can use PHP it would be best. With Javascript/CSS anyone could look at the source and still see your text.

__________________
Looking for FREE TRAFFIC?

Reply With Quote
  #4 (permalink)  
Old 12-12-2007, 01:41 AM
Rookie
 
Join Date: Dec 2007
Posts: 45
Dartz is on a distinguished road
Most likely an If statement that checks if you're logged in will do the trick. I don't know how to do it in PHP but thats the general idea.

Reply With Quote
  #5 (permalink)  
Old 12-12-2007, 03:14 AM
donna's Avatar
Member
 
Join Date: Oct 2007
Location: New Zealand
Posts: 202
donna is on a distinguished road
Basically you want to have the login form go to an 'action' page which checks that the login details are correct and if they are it will set a cookie something like 'loggedin = true' (you would set that same variable to false by default). Then the page you want hidden text on would use an if statement something like this:

if (loggedin == true) {
... show the secret text...
}

If you need more help let me know by posting again and I'll see what I can come up with for you. But chances are there are lots of scripts out there that do this. If you really don't know PHP though they may be a bit daunting to use.

Donna

__________________
Looking for FREE TRAFFIC?

Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
DHTML or Javascript: tooltip rollover text with hidden layer position? RoboGeek Webdesign & HMTL 1 05-24-2006 05:47 AM
wife has two cel phones. says same phone number for both phones and she takes calls & texts on these phones? u9026b General Discussions 1 01-14-2006 09:17 AM


All times are GMT. The time now is 07:22 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0