View Full Version : How do i make a text box...
habboleaders
06-06-2007, 10:10 PM
How do I make a text box only people in the edditor can change whats inside. So it has a scroll bar
nuweb
06-08-2007, 11:16 PM
depends on what u got going.
To Display Comments
if($editor = 1){
//Shows Form for Editor
echo '<FORM ACTION="editorcommentsubmit.php" METHOD=POST>';
echo '<TEXTAREA NAME="comments" COLS=40 ROWS=6>'.$edittext.'</TEXTAREA>';
echo '<INPUT TYPE=SUBMIT VALUE="submit"></FORM>';
} else {
//Shows Just Text to visitors
echo $edittext
}
So now, For every user.
If they are a editor, you need to set $editor to 1:
$editor = 1;
You also need a mysql query, to get text that you want to be able to be edited from your mysql database. Set that text to:
$edittext
Also you then need to create a "editorcommentsubmit.php" that when you Submit a form it goes to that page, and updates the database.
----------------------------------
Its not easy, lol.
Good Luck With It! ..
habboleaders
06-21-2007, 07:37 PM
No I mean in HTML and example - www.habboaddicts.net
arenlor
06-22-2007, 02:24 AM
After viewing the source, they use an iframe, I don't know anything about it as I don't use it, but I'm sure someone will come along with help.
habboleaders
06-22-2007, 11:44 AM
What's an Iframe?
Tyler
06-22-2007, 02:35 PM
To let them change it dynamically on the web like you seem to want your going to have to use php. You might want to use a pre built script like "cute news" or something like that.
zidian
06-27-2007, 01:03 AM
I think that the idea you have is pointing towards AJAX. It is a very complicated code that you may have to spend a few months working on before you fully understand it. It is kinda of like the script this forum uses. If I understand you correctly, you want to be able to click on something, type in text, press enter, and It change automatically without going to another page like with php.
habboleaders
06-27-2007, 12:50 PM
No, what I mean is if i have a text box. And only people that are ADMINS to my site can click on it and add what ever. But when I save it people that just visit the page cannot edit it
habboleaders
06-27-2007, 09:47 PM
Example! - http://www.w3schools.com/html/tryit.asp?filename=tryhtml_link_locations One on the right!!
cr0wonline
07-02-2007, 07:23 PM
That's an iframe, not a textbox ;)
zidian
07-16-2007, 11:39 PM
Not as simple as you think. You just want it to magically change. You have to store the data in a database, as they did.
habboleaders
07-19-2007, 12:57 PM
Or I fopund out from searching ->
<iframe src="" scrolling="no"> </iframe> <- Taking a page directly from another site.
Iframe that can change another iframe ->
http://www.samisite.com/moreiframes/double.htm
Dicribed in detail!!
beboskins
07-20-2007, 12:10 AM
If you want a scrolling box you can check out my tutorial here (http://padraigcurran.com/tutorials/css/scrolling-css-box/).
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.