What does this do?
[PHP]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
</head>
<body>
<form name="frmLeet" action="https://localhost/leetspeek/index.php" method="POST">
<p>Enter your message</p>
<textarea name="sentence" rows="4" cols="60"></textarea>
</ br>
<input type="submit" value="SUBMIT" name="Convert message" />
<?php
// put your code here
// stri[ thee data
IF ($_POST == null)
{return;}
$sentence = $_POST["sentence"];
$leet = $sentence;
$leet = str_ireplace("e","3",$leet ) ;
//output
echo "$sentence<br />";
echo "is converted to <br />";
echo "$leet<br />";
?>
</form>
</body>
</html>[/PHP]
ONLY DOSE
$leet = str_ireplace("e","3",$leet ) ;
REPLACE E WITH 3
all i did....
YOU CAN EDIT AND ADD MORE!
What does this do?
I'm back.
I agree With Treeham
I'm back.
that seems rly easy and simple
Respect List:
Nooby Banana
Bombsaway
Luke
1) The action in your form can just set on #.
2) A form has no name needed -> delete!
3) Wrong way to check whether your form has been sent.
4) Variables should not be in quotes!
5) $leet = $sentence; is not necessary!
[php]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
</head>
<body>
<form action="#" method="post">
<p>Enter your message</p>
<textarea name="sentence" rows="4" cols="60"></textarea>
<br/>
<input type="submit" value="SUBMIT" name="Convert message" />
<?php
// put your code here
// stri[ thee data
if($_SERVER['REQUEST_METHOD'] == 'POST')
{
if(isset($_POST['sentence']))
{
$sentence = $_POST["sentence"];
$leet = str_ireplace("e","3",$sentence ) ;
//output
echo $sentence."<br/>";
echo "is converted to <br/>";
echo $leet."<br/>";
}
}
?>
</form>
</body>
</html>[/php]
yearupi, id do something like
if($_POST['Convert message'] == "SUBMIT")
{
It replaces 'e' with '3', there are more changes you can make to make it more "l33t", change all the l's to 1's and o's to 0's, etc..
THE EYE OF AN ADMINISTRATOR IS UPON YOU. ANY WRONG YOU DO IM GONNA SEE, WHEN YOU'RE ON MPGH, LOOK BEHIND YOU, 'CAUSE THATS WHERE IM GONNA BE
"First they ignore you. Then they laugh at you. Then they fight you. Then you lose.” - Dave84311
HAVING VIRTUAL DETOX