TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,972
  • Latest: Lineo
Stats
  • Total Posts: 196,105
  • Total Topics: 21,345
  • Online today: 1,072
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 1
  • Guests: 852
  • Total: 853
  • @rjen

Ok guys can any of you help me.

Started by Wartog, July 31, 2006, 10:11:56 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

bloc

#10
Using php:
if(isset($_POST['mycode']))
$mycode=$_POST['mycode'];
else
$mycode='background: red; color: white; border: solid 1px black;';

echo '
div style="'.$mycode.'">a test box</div>
<form name="mycolchanger" action="'.$_SERVER['PHP_SELF'] .'" method="post">
<textarea name="mycode" rows=5 cols=20 wrap="auto">'.$mycode.'</textarea><br />
<input type="submit" value="try it"></form>';


It will send the code to itself and display the effect ona test box above. But currently, it will not work on a phpbox in TP. Thats a bug in TP with forms I need to fix.

IchBin

I think this part
$_SERVER['php self']

Needs to be
$_SERVER['PHP_SELF']

I think.... lol
Just give me a good smack if I'm wrong Bloc. :)

bloc


Crip

I have become comfortably numb!

Cripzone | Crip's Free 2.0.2 Themes



Crip

I have become comfortably numb!

Cripzone | Crip's Free 2.0.2 Themes



IchBin

Quote from: crip on July 31, 2006, 05:06:48 PM
Why in CAPS ? .. curious.
The do this with all the predefined variables for PHP I think just to set them apart.

Crip

I see, like in HTML this is a period . and in PHP this acts like a period ; Yes?
I have become comfortably numb!

Cripzone | Crip's Free 2.0.2 Themes



IchBin

Yea, it pretty much just tells PHP to stop executing that line of code and to move on to the next.

Crip

I have these PHP tutorials videos, and I've learned some..but nothing to brag about.. I also installed the WAMP app.. lets me test small bits of code before i try them on-line.
I have become comfortably numb!

Cripzone | Crip's Free 2.0.2 Themes



This website is proudly hosted on Crocweb Cloud Website Hosting.